Debian Codegraph @

test cases/common/3 static/meson.build

raw
1 project('static library test', 'c', default_options : ['default_library=static'])
2
3 lib = static_library('mylib', get_option('source'),
4 link_args : '-THISMUSTNOBEUSED') # Static linker needs to ignore all link args.
5 assert(lib.name() == 'mylib')
6 has_not_changed = false
7 if is_disabler(lib)
8 has_not_changed = true
9 else
10 has_not_changed = true
11 endif
12 assert(has_not_changed, 'Static library has changed.')
13
14 assert(not is_disabler(lib), 'Static library is a disabler.')
15
16 if get_option('default_library') == 'static'
17 library('lib2', 'lib3.c', c_static_args : ['-DWORK'], c_shared_args : ['-DBREAK'])
18 endif
19 build_target('lib4', 'lib3.c', c_static_args : ['-DWORK'], target_type : 'static_library', link_args : '')