Skip to content

Commit

Permalink
Add test case for "subproject:opt" in project()
Browse files Browse the repository at this point in the history
This is regression test for mesonbuild#7573
  • Loading branch information
xclaesse committed Oct 5, 2020
1 parent ce6523e commit e64b8d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test cases/common/90 default options/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand All @@ -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')
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
project('sub1')

assert(get_option('test_option') == false)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
option('test_option', type : 'boolean', value : true, description : 'Test option. Superproject overrides default to "false"')

0 comments on commit e64b8d3

Please sign in to comment.