##// END OF EJS Templates
Updates meson.build
Alexandre Leroux -
r692:2e883759a2fd
parent child
Show More
@@ -1,32 +1,45
1
1
2 mockplugin_moc_headers = [
2 mockplugin_moc_headers = [
3 'include/MockPlugin.h'
3 'include/MockPlugin.h'
4 ]
4 ]
5
5
6 mockplugin_sources = [
6 mockplugin_sources = [
7 'src/CosinusProvider.cpp',
7 'src/CosinusProvider.cpp',
8 'src/MockPlugin.cpp'
8 'src/MockPlugin.cpp'
9 ]
9 ]
10
10
11 mockplugin_inc = include_directories(['include', '../../plugin/include'])
11 mockplugin_inc = include_directories(['include', '../../plugin/include'])
12
12
13
13
14 gen = generator(moc,
14 gen = generator(moc,
15 output : 'moc_@BASENAME@.cpp',
15 output : 'moc_@BASENAME@.cpp',
16 arguments : ['@INPUT@',
16 arguments : ['@INPUT@',
17 '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/mockplugin/resources/mockplugin.json"',
17 '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/mockplugin/resources/mockplugin.json"',
18 '-I', meson.current_source_dir()+'/include',
18 '-I', meson.current_source_dir()+'/include',
19 '-I', meson.current_source_dir()+'/../../plugin/include',
19 '-I', meson.current_source_dir()+'/../../plugin/include',
20 '-o', '@OUTPUT@'])
20 '-o', '@OUTPUT@'])
21
21
22 mockplugin_moc_files = gen.process(mockplugin_moc_headers)
22 mockplugin_moc_files = gen.process(mockplugin_moc_headers)
23
23
24 sciqlop_mockplugin = library('mockplugin',
24 sciqlop_mockplugin = library('mockplugin',
25 mockplugin_sources,
25 mockplugin_sources,
26 mockplugin_moc_files,
26 mockplugin_moc_files,
27 cpp_args : '-DMOCKPLUGIN_LIB',
27 cpp_args : '-DMOCKPLUGIN_LIB',
28 include_directories : [mockplugin_inc],
28 include_directories : [mockplugin_inc],
29 dependencies : [sciqlop_core, sciqlop_gui],
29 dependencies : [sciqlop_core, sciqlop_gui],
30 install : true
30 install : true
31 )
31 )
32
32
33 tests = [
34 [['tests/TestCosinusAcquisition.cpp'],'test_cosinus_acquisition','Cosinus Acquisition test']
35 ]
36
37 foreach unit_test : tests
38 test_moc_files = qt5.preprocess(moc_sources : unit_test[0])
39 test_exe = executable(unit_test[1],unit_test[0] , test_moc_files,
40 link_with : [sciqlop_mockplugin],
41 include_directories : [mockplugin_inc],
42 cpp_args : ['-DMOCKPLUGIN_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'],
43 dependencies : [sciqlop_core, sciqlop_gui, qt5test])
44 test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60)
45 endforeach No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now