test24: check that a target extra_arg is not applied to other targets

pull/445/head
Nicolas Schneider 9 years ago
parent 304c0d2cb5
commit 246d9f4564
  1. 9
      test cases/common/24 target arg/func2.c
  2. 2
      test cases/common/24 target arg/meson.build
  3. 13
      test cases/common/24 target arg/prog2.cc

@ -0,0 +1,9 @@
#ifdef CTHING
#error "Local C argument set in wrong target"
#endif
#ifdef CPPTHING
#error "Local CPP argument set in wrong target"
#endif
int func() { return 0; }

@ -3,5 +3,7 @@ project('local arg test', 'cpp', 'c')
exe1 = executable('prog', 'prog.cc', 'func.c', \
c_args : '-DCTHING', \
cpp_args : '-DCPPTHING')
exe2 = executable('prog2', 'prog2.cc', 'func2.c')
test('prog1', exe1)
test('prog2', exe2)

@ -0,0 +1,13 @@
#ifdef CTHING
#error "Local C argument set in wrong target"
#endif
#ifdef CPPTHING
#error "Local CPP argument set in wrong target"
#endif
extern "C" int func();
int main(int argc, char **argv) {
return func();
}
Loading…
Cancel
Save