meson.build
78 lines
| 3.0 KiB
| text/plain
|
TextLexer
r620 | ||||
amdaplugin_moc_headers = [ | ||||
r766 | 'include/AmdaPlugin.h', | |||
'include/AmdaProvider.h' | ||||
r620 | ] | |||
amdaplugin_sources = [ | ||||
'src/AmdaDefs.cpp', | ||||
'src/AmdaParser.cpp', | ||||
'src/AmdaPlugin.cpp', | ||||
'src/AmdaProvider.cpp', | ||||
|
r956 | 'src/AmdaResultParser.cpp', | ||
'src/AmdaResultParserDefs.cpp', | ||||
|
r1111 | 'src/AmdaResultParserHelper.cpp', | ||
'src/AmdaServer.cpp' | ||||
r620 | ] | |||
amdaplugin_ui_files = [] | ||||
amdaplugin_resources_files = [ | ||||
'resources/amdaresources.qrc' | ||||
] | ||||
r1333 | amdaplugin_inc = include_directories(['include']) | |||
r620 | ||||
r1395 | amdaplugin_prep_files = qt5.preprocess(moc_headers : amdaplugin_moc_headers, | |||
moc_extra_arguments: ['-DSCIQLOP_PLUGIN_JSON_FILE_PATH="'+ | ||||
meson.source_root()+ | ||||
'/plugins/amda/resources/amda.json"'], | ||||
include_directories: [amdaplugin_inc, core_inc], | ||||
qresources : amdaplugin_resources_files, | ||||
ui_files : amdaplugin_ui_files) | ||||
r620 | ||||
r1397 | cpp_args = ['-DAMDA_LIB','-DQT_PLUGIN'] | |||
message('======================='+get_option('default_library')+'==========================') | ||||
if(get_option('default_library') == 'static') | ||||
message('building amda plugin as static lib') | ||||
cpp_args += ['-DQT_STATICPLUGIN'] | ||||
endif | ||||
r620 | sciqlop_amdaplugin = library('amdaplugin', | |||
amdaplugin_sources, | ||||
r1395 | amdaplugin_prep_files, | |||
r1397 | cpp_args : cpp_args, | |||
r662 | include_directories : [amdaplugin_inc], | |||
dependencies : [sciqlop_core, sciqlop_gui], | ||||
r1397 | install : true, | |||
install_dir : join_paths(get_option('libdir'), 'SciQLop') | ||||
r620 | ) | |||
tests = [ | ||||
r633 | [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'], | |||
[['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'], | ||||
|
r1168 | [['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test'], | ||
[['tests/TestAmdaFuzzing.cpp'],'test_amda_fuzzing','AMDA fuzzing test'] | ||||
r620 | ] | |||
|
r1169 | tests_sources = [ | ||
'tests/FuzzingDefs.h', | ||||
'tests/FuzzingDefs.cpp', | ||||
|
r1171 | 'tests/FuzzingOperations.h', | ||
'tests/FuzzingOperations.cpp', | ||||
|
r1175 | 'tests/FuzzingUtils.h', | ||
|
r1193 | 'tests/FuzzingUtils.cpp', | ||
'tests/FuzzingValidators.h', | ||||
'tests/FuzzingValidators.cpp' | ||||
|
r1169 | ] | ||
r620 | foreach unit_test : tests | |||
test_moc_files = qt5.preprocess(moc_sources : unit_test[0]) | ||||
test_exe = executable(unit_test[1],unit_test[0] , test_moc_files, | ||||
r662 | link_with : [sciqlop_amdaplugin], | |||
include_directories : [amdaplugin_inc], | ||||
r620 | cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'], | |||
|
r1169 | sources : [tests_sources], | ||
r662 | dependencies : [sciqlop_core, sciqlop_gui, qt5test]) | |||
r633 | test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60) | |||
r620 | endforeach | |||