diff --git a/test cases/common/90 default options/meson.build b/test cases/common/90 default options/meson.build index 4a9fc2fe7..51b5cdac9 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 000000000..de0dc216c --- /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 000000000..fc96f5e09 --- /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"')