Debian Codegraph @

test cases/common/223 persubproject options/meson.build

raw
1 project('persubproject options', 'c', 'cpp',
2 default_options : ['werror=true',
3 'warning_level=3',
4 'cpp_std=c++11'])
5
6 assert(get_option('default_library') == 'both', 'Parent default_library should be "both"')
7 assert(get_option('werror'))
8 assert(get_option('warning_level') == '3')
9 assert(get_option('cpp_std') == 'c++11')
10
11
12 # Check it build both by calling a method only both_libraries target implement
13 lib = library('lib1', 'foo.c')
14 lib.get_static_lib()
15
16 subproject('sub1')
17
18 libcpp14_dep = dependency('libcpp14', fallback: 'sub2', default_options : ['default_library=static'])
19 exe = executable('test1', 'main.cpp', dependencies : libcpp14_dep)
20 test('mixing-cpp-version', exe)