diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2020-03-18 09:48:00 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-24 22:48:55 +0200 |
commit | 4d7ccd13990feed8fa5c8a9c3fa9bdf5949e3a04 (patch) | |
tree | b5a08a1666a78927996afc1226a57f241248593e /test cases/common | |
parent | b3fe9fa5d86bf48649adf72333531f6e164ab381 (diff) | |
download | meson-4d7ccd13990feed8fa5c8a9c3fa9bdf5949e3a04.zip meson-4d7ccd13990feed8fa5c8a9c3fa9bdf5949e3a04.tar.gz meson-4d7ccd13990feed8fa5c8a9c3fa9bdf5949e3a04.tar.bz2 |
Make werror per subproject option
Diffstat (limited to 'test cases/common')
3 files changed, 12 insertions, 2 deletions
diff --git a/test cases/common/229 persubproject options/meson.build b/test cases/common/229 persubproject options/meson.build index 6a76697..20dff90 100644 --- a/test cases/common/229 persubproject options/meson.build +++ b/test cases/common/229 persubproject options/meson.build @@ -1,6 +1,9 @@ -project('persubproject options', 'c', default_options : ['default_library=both']) +project('persubproject options', 'c', + default_options : ['default_library=both', + 'werror=true']) assert(get_option('default_library') == 'both', 'Parent default_library should be "both"') +assert(get_option('werror')) # Check it build both by calling a method only both_libraries target implement lib = library('lib1', 'foo.c') diff --git a/test cases/common/229 persubproject options/subprojects/sub2/foo.c b/test cases/common/229 persubproject options/subprojects/sub2/foo.c index 63e4de6..cf7201b 100644 --- a/test cases/common/229 persubproject options/subprojects/sub2/foo.c +++ b/test cases/common/229 persubproject options/subprojects/sub2/foo.c @@ -1,5 +1,9 @@ int foo(void); +#ifdef __GNUC__ +#warning This should not produce error +#endif + int foo(void) { return 0; } diff --git a/test cases/common/229 persubproject options/subprojects/sub2/meson.build b/test cases/common/229 persubproject options/subprojects/sub2/meson.build index 546884d..f1226b8 100644 --- a/test cases/common/229 persubproject options/subprojects/sub2/meson.build +++ b/test cases/common/229 persubproject options/subprojects/sub2/meson.build @@ -1,6 +1,9 @@ -project('sub2', 'c', default_options : ['default_library=shared']) +project('sub2', 'c', + default_options : ['default_library=shared', + 'werror=false']) assert(get_option('default_library') == 'static', 'Parent should override default_library') +assert(not get_option('werror')) # If it doesn't build only a static library, it would make target name clash. library('lib1', 'foo.c') |