summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/229 persubproject options/meson.build5
-rw-r--r--test cases/common/229 persubproject options/subprojects/sub2/foo.c4
-rw-r--r--test cases/common/229 persubproject options/subprojects/sub2/meson.build5
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 6a76697e2..20dff90c9 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 63e4de6a3..cf7201b92 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 546884de3..f1226b8ba 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')