meson: add tests and option to disable them
This enables building the Luppp unit tests with Meson, and adds an option to disable building those tests. For a release, the option should probably be off - although currently it has no significant impact on the result. Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>main
parent
48802f14ad
commit
f34a44e775
12
meson.build
12
meson.build
|
@ -1,10 +1,16 @@
|
||||||
project('openav_luppp', ['c','cpp'])
|
project( 'openav_luppp', ['c','cpp'],
|
||||||
|
default_options : [
|
||||||
|
'cpp_std=c++11',
|
||||||
|
])
|
||||||
|
|
||||||
conf_data = configuration_data()
|
conf_data = configuration_data()
|
||||||
conf_data.set('version', '1.1.1')
|
conf_data.set('version', '1.1.1')
|
||||||
|
|
||||||
#add_project_arguments('-std=c99', language : 'c')
|
|
||||||
#add_project_arguments('-std=c++11', language : 'cpp')
|
if(get_option('tests') == true)
|
||||||
|
add_project_arguments('-DBUILD_TESTS', language : 'cpp')
|
||||||
|
endif
|
||||||
|
|
||||||
add_project_arguments('-Wno-unused-variable', language : 'cpp')
|
add_project_arguments('-Wno-unused-variable', language : 'cpp')
|
||||||
add_project_arguments('-Wno-reorder', language : 'cpp')
|
add_project_arguments('-Wno-reorder', language : 'cpp')
|
||||||
add_project_arguments('-Wno-sign-compare', language : 'cpp')
|
add_project_arguments('-Wno-sign-compare', language : 'cpp')
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
option('tests', type : 'boolean', value : true, description : 'Build tests')
|
|
@ -30,3 +30,7 @@ subdir('controller')
|
||||||
subdir('observer')
|
subdir('observer')
|
||||||
subdir('state')
|
subdir('state')
|
||||||
subdir('avtk')
|
subdir('avtk')
|
||||||
|
|
||||||
|
if(get_option('tests') == true)
|
||||||
|
subdir('tests')
|
||||||
|
endif
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
luppp_src += files(
|
||||||
|
'diskreadertest.cxx',
|
||||||
|
'diskwritertest.cxx',
|
||||||
|
'goptionstest.cxx',
|
||||||
|
'gridlogictests.cxx')
|
Loading…
Reference in New Issue