diff options
author | Nicolas Schneider <nioncode+git@gmail.com> | 2016-03-13 14:49:08 +0100 |
---|---|---|
committer | Nicolas Schneider <nioncode+git@gmail.com> | 2016-03-13 14:49:08 +0100 |
commit | 246d9f4564bb33e4404cc438932c206378b4b277 (patch) | |
tree | 5cfd72c66706540a77bcd29440b6dab2740eb2ec | |
parent | 304c0d2cb5b2a25669cea0ade51e7eadfb33c32b (diff) | |
download | meson-246d9f4564bb33e4404cc438932c206378b4b277.zip meson-246d9f4564bb33e4404cc438932c206378b4b277.tar.gz meson-246d9f4564bb33e4404cc438932c206378b4b277.tar.bz2 |
test24: check that a target extra_arg is not applied to other targets
-rw-r--r-- | test cases/common/24 target arg/func2.c | 9 | ||||
-rw-r--r-- | test cases/common/24 target arg/meson.build | 2 | ||||
-rw-r--r-- | test cases/common/24 target arg/prog2.cc | 13 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test cases/common/24 target arg/func2.c b/test cases/common/24 target arg/func2.c new file mode 100644 index 0000000..d3e91a5 --- /dev/null +++ b/test cases/common/24 target arg/func2.c @@ -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; } diff --git a/test cases/common/24 target arg/meson.build b/test cases/common/24 target arg/meson.build index 5aec31d..11ac006 100644 --- a/test cases/common/24 target arg/meson.build +++ b/test cases/common/24 target arg/meson.build @@ -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) diff --git a/test cases/common/24 target arg/prog2.cc b/test cases/common/24 target arg/prog2.cc new file mode 100644 index 0000000..ef2fc4b --- /dev/null +++ b/test cases/common/24 target arg/prog2.cc @@ -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(); +} |