aboutsummaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/90 default options/meson.build3
-rw-r--r--test cases/common/90 default options/subprojects/sub1/meson.build3
-rw-r--r--test cases/common/90 default options/subprojects/sub1/meson_options.txt1
3 files changed, 7 insertions, 0 deletions
diff --git a/test cases/common/90 default options/meson.build b/test cases/common/90 default options/meson.build
index 4a9fc2f..51b5cda 100644
--- a/test cases/common/90 default options/meson.build
+++ b/test cases/common/90 default options/meson.build
@@ -4,6 +4,7 @@ project('default options', 'cpp', 'c', default_options : [
'cpp_std=c++11',
'cpp_eh=none',
'warning_level=3',
+ 'sub1:test_option=false',
])
assert(get_option('buildtype') == 'debugoptimized', 'Build type default value wrong.')
@@ -28,3 +29,5 @@ assert(w_level == '3', 'warning level "' + w_level + '" instead of "3"')
# assert(not cc.compiles('int foobar;'), 'Default arg not used in test.')
# assert(cc.compiles('int foobar;', no_builtin_args : true), 'No_builtin did not disable builtins.')
# endif
+
+subproject('sub1')
diff --git a/test cases/common/90 default options/subprojects/sub1/meson.build b/test cases/common/90 default options/subprojects/sub1/meson.build
new file mode 100644
index 0000000..de0dc21
--- /dev/null
+++ b/test cases/common/90 default options/subprojects/sub1/meson.build
@@ -0,0 +1,3 @@
+project('sub1')
+
+assert(get_option('test_option') == false)
diff --git a/test cases/common/90 default options/subprojects/sub1/meson_options.txt b/test cases/common/90 default options/subprojects/sub1/meson_options.txt
new file mode 100644
index 0000000..fc96f5e
--- /dev/null
+++ b/test cases/common/90 default options/subprojects/sub1/meson_options.txt
@@ -0,0 +1 @@
+option('test_option', type : 'boolean', value : true, description : 'Test option. Superproject overrides default to "false"')