diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2020-08-09 07:57:51 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2020-10-16 17:42:24 -0400 |
commit | 254b836bd49a10dd2cb4a91771398a8d08d59dda (patch) | |
tree | 6678370e9b5c971a8b248bf44ce07c1e0f35744b /test cases/common | |
parent | 7902d2032d45f0f44ffad19362e62b301467c918 (diff) | |
download | meson-254b836bd49a10dd2cb4a91771398a8d08d59dda.zip meson-254b836bd49a10dd2cb4a91771398a8d08d59dda.tar.gz meson-254b836bd49a10dd2cb4a91771398a8d08d59dda.tar.bz2 |
Add test case for "subproject:opt" in project()
This is regression test for #7573
Diffstat (limited to 'test cases/common')
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"') |