##// END OF EJS Templates
Disables TestVariableSync
Alexandre Leroux -
r895:447f2dd17d69
parent child
Show More
@@ -1,156 +1,160
1
1
2 ## core - CMakeLists.txt
2 ## core - CMakeLists.txt
3 STRING(TOLOWER ${CMAKE_PROJECT_NAME} LIBRARY_PREFFIX)
3 STRING(TOLOWER ${CMAKE_PROJECT_NAME} LIBRARY_PREFFIX)
4 SET(SQPCORE_LIBRARY_NAME "${LIBRARY_PREFFIX}_core${DEBUG_SUFFIX}")
4 SET(SQPCORE_LIBRARY_NAME "${LIBRARY_PREFFIX}_core${DEBUG_SUFFIX}")
5 SET(SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/")
5 SET(SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/")
6 SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/")
6 SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/")
7
7
8 # Include core directory
8 # Include core directory
9 include_directories("${INCLUDES_DIR}")
9 include_directories("${INCLUDES_DIR}")
10
10
11 # Set a variable to display a warning in the version files.
11 # Set a variable to display a warning in the version files.
12 SET(SCIQLOP_CMAKE_GENERATION_WARNING "DON'T CHANGE THIS FILE. AUTOGENERATED BY CMAKE.")
12 SET(SCIQLOP_CMAKE_GENERATION_WARNING "DON'T CHANGE THIS FILE. AUTOGENERATED BY CMAKE.")
13 # Generate the version file from the cmake version variables. The version
13 # Generate the version file from the cmake version variables. The version
14 # variables are defined in the cmake/sciqlop_version.cmake file.
14 # variables are defined in the cmake/sciqlop_version.cmake file.
15 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.h.in"
15 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.h.in"
16 "${INCLUDES_DIR}/Version.h")
16 "${INCLUDES_DIR}/Version.h")
17 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.cpp.in"
17 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.cpp.in"
18 "${SOURCES_DIR}/Version.cpp")
18 "${SOURCES_DIR}/Version.cpp")
19
19
20 # Find dependent modules
20 # Find dependent modules
21 find_package(sciqlop-plugin)
21 find_package(sciqlop-plugin)
22 INCLUDE_DIRECTORIES(${SCIQLOP-PLUGIN_INCLUDE_DIR})
22 INCLUDE_DIRECTORIES(${SCIQLOP-PLUGIN_INCLUDE_DIR})
23
23
24 #
24 #
25 # Find Qt modules
25 # Find Qt modules
26 #
26 #
27 SCIQLOP_FIND_QT(Core Network)
27 SCIQLOP_FIND_QT(Core Network)
28
28
29 #
29 #
30 # Compile the library library
30 # Compile the library library
31 #
31 #
32
32
33 ADD_DEFINITIONS(-DCORE_LIB)
33 ADD_DEFINITIONS(-DCORE_LIB)
34
34
35 FILE (GLOB_RECURSE MODULE_SOURCES
35 FILE (GLOB_RECURSE MODULE_SOURCES
36 ${INCLUDES_DIR}/*.h
36 ${INCLUDES_DIR}/*.h
37 ${SOURCES_DIR}/*.c
37 ${SOURCES_DIR}/*.c
38 ${SOURCES_DIR}/*.cpp
38 ${SOURCES_DIR}/*.cpp
39 ${SOURCES_DIR}/*.h)
39 ${SOURCES_DIR}/*.h)
40
40
41 ADD_LIBRARY(${SQPCORE_LIBRARY_NAME} ${MODULE_SOURCES})
41 ADD_LIBRARY(${SQPCORE_LIBRARY_NAME} ${MODULE_SOURCES})
42 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
42 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
43 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
43 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
44 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME})
44 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME})
45 qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core Network)
45 qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core Network)
46
46
47 INSTALL(TARGETS ${SQPCORE_LIBRARY_NAME}
47 INSTALL(TARGETS ${SQPCORE_LIBRARY_NAME}
48 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
48 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
49 LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
49 LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
50 ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR}
50 ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR}
51 )
51 )
52
52
53 # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html
53 # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html
54 # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order.
54 # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order.
55 # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets
55 # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets
56 IF(BUILD_SHARED_LIBS)
56 IF(BUILD_SHARED_LIBS)
57 SET_TARGET_PROPERTIES(${SQPCORE_LIBRARY_NAME} PROPERTIES COMPILE_DEFINITIONS "SCIQLOP_EXPORT")
57 SET_TARGET_PROPERTIES(${SQPCORE_LIBRARY_NAME} PROPERTIES COMPILE_DEFINITIONS "SCIQLOP_EXPORT")
58 ELSE()
58 ELSE()
59 TARGET_COMPILE_DEFINITIONS(${SQPCORE_LIBRARY_NAME} PUBLIC "SCIQLOP_STATIC_LIBRARIES")
59 TARGET_COMPILE_DEFINITIONS(${SQPCORE_LIBRARY_NAME} PUBLIC "SCIQLOP_STATIC_LIBRARIES")
60 ENDIF()
60 ENDIF()
61
61
62 # Set the variable to parent scope so that the other projects can copy the
62 # Set the variable to parent scope so that the other projects can copy the
63 # dependent shared libraries
63 # dependent shared libraries
64 SCIQLOP_SET_TO_PARENT_SCOPE(SQPCORE_LIBRARY_NAME)
64 SCIQLOP_SET_TO_PARENT_SCOPE(SQPCORE_LIBRARY_NAME)
65
65
66 # Copy extern shared libraries to the lib folder
66 # Copy extern shared libraries to the lib folder
67 SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPCORE_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES})
67 SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPCORE_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES})
68
68
69 # Add the files to the list of files to be analyzed
69 # Add the files to the list of files to be analyzed
70 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
70 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
71 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
71 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
72 # Vera++ exclusion files
72 # Vera++ exclusion files
73 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
73 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
74 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
74 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
75
75
76 #
76 #
77 # Compile the tests
77 # Compile the tests
78 #
78 #
79 IF(BUILD_TESTS)
79 IF(BUILD_TESTS)
80 INCLUDE_DIRECTORIES(${SOURCES_DIR})
80 INCLUDE_DIRECTORIES(${SOURCES_DIR})
81 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
81 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
82 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
82 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
83
84 # Disable TestVarSync (temporary)
85 LIST (REMOVE_ITEM TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/tests/Variable/TestVariableSync.cpp)
86
83 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME})
87 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME})
84
88
85 SET(TARGETS_COV)
89 SET(TARGETS_COV)
86 FOREACH( testFile ${TESTS_SOURCES} )
90 FOREACH( testFile ${TESTS_SOURCES} )
87 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
91 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
88 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
92 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
89
93
90 # Add to the list of sources files all the sources in the same
94 # Add to the list of sources files all the sources in the same
91 # directory that aren't another test
95 # directory that aren't another test
92 FILE (GLOB currentTestSources
96 FILE (GLOB currentTestSources
93 ${testDirectory}/*.c
97 ${testDirectory}/*.c
94 ${testDirectory}/*.cpp
98 ${testDirectory}/*.cpp
95 ${testDirectory}/*.h)
99 ${testDirectory}/*.h)
96 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
100 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
97 # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
101 # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
98
102
99 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
103 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
100 set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14)
104 set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14)
101 set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON)
105 set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON)
102 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} )
106 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} )
103 qt5_use_modules(${testName} Test)
107 qt5_use_modules(${testName} Test)
104
108
105 ADD_TEST( NAME ${testName} COMMAND ${testName} )
109 ADD_TEST( NAME ${testName} COMMAND ${testName} )
106
110
107 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES})
111 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES})
108 set(Coverage_NAME ${testName})
112 set(Coverage_NAME ${testName})
109 if(UNIX)
113 if(UNIX)
110 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
114 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
111 LIST( APPEND TARGETS_COV ${testName}_coverage)
115 LIST( APPEND TARGETS_COV ${testName}_coverage)
112 endif(UNIX)
116 endif(UNIX)
113
117
114 ENDFOREACH( testFile )
118 ENDFOREACH( testFile )
115
119
116 add_custom_target(coverage)
120 add_custom_target(coverage)
117
121
118 FOREACH( target_cov ${TARGETS_COV} )
122 FOREACH( target_cov ${TARGETS_COV} )
119 add_custom_command(TARGET coverage PRE_BUILD COMMAND make ${target_cov})
123 add_custom_command(TARGET coverage PRE_BUILD COMMAND make ${target_cov})
120 ENDFOREACH( target_cov )
124 ENDFOREACH( target_cov )
121
125
122 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
126 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
123 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
127 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
124 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
128 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
125 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
129 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
126 ENDIF(BUILD_TESTS)
130 ENDIF(BUILD_TESTS)
127
131
128 #
132 #
129 # Set the files that must be formatted by clang-format.
133 # Set the files that must be formatted by clang-format.
130 #
134 #
131 LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES})
135 LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES})
132 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
136 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
133
137
134 #
138 #
135 # Set the directories that doxygen must browse to generate the
139 # Set the directories that doxygen must browse to generate the
136 # documentation.
140 # documentation.
137 #
141 #
138 # Source directories:
142 # Source directories:
139 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
143 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
140 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
144 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
141 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
145 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
142 # Source directories to exclude from the documentation generation
146 # Source directories to exclude from the documentation generation
143 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
147 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
144 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
148 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
145
149
146 #
150 #
147 # Set the directories with the sources to analyze and propagate the
151 # Set the directories with the sources to analyze and propagate the
148 # modification to the parent scope
152 # modification to the parent scope
149 #
153 #
150 # Source directories to analyze:
154 # Source directories to analyze:
151 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
155 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
152 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
156 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
153 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
157 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
154 # Source directories to exclude from the analysis
158 # Source directories to exclude from the analysis
155 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
159 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
156 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
160 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
@@ -1,31 +1,31
1
1
2
2
3 tests = [
3 tests = [
4 [['Common/TestStringUtils.cpp'],'test_string_utils','StringUtils test'],
4 [['Common/TestStringUtils.cpp'],'test_string_utils','StringUtils test'],
5 [['Data/TestScalarSeries.cpp'],'test_scalar','ScalarSeries test'],
5 [['Data/TestScalarSeries.cpp'],'test_scalar','ScalarSeries test'],
6 [['Data/TestSpectrogramSeries.cpp'],'test_spectrogram','SpectrogramSeries test'],
6 [['Data/TestSpectrogramSeries.cpp'],'test_spectrogram','SpectrogramSeries test'],
7 [['Data/TestVectorSeries.cpp'],'test_vector','VectorSeries test'],
7 [['Data/TestVectorSeries.cpp'],'test_vector','VectorSeries test'],
8 [['Data/TestOneDimArrayData.cpp'],'test_1d','One Dim Array test'],
8 [['Data/TestOneDimArrayData.cpp'],'test_1d','One Dim Array test'],
9 [['Data/TestOptionalAxis.cpp'],'test_optional_axis','OptionalAxis test'],
9 [['Data/TestOptionalAxis.cpp'],'test_optional_axis','OptionalAxis test'],
10 [['Data/TestTwoDimArrayData.cpp'],'test_2d','Two Dim Array test'],
10 [['Data/TestTwoDimArrayData.cpp'],'test_2d','Two Dim Array test'],
11 [['DataSource/TestDataSourceController.cpp'],'test_data_source','DataSourceController test'],
11 [['DataSource/TestDataSourceController.cpp'],'test_data_source','DataSourceController test'],
12 [['Variable/TestVariableCacheController.cpp'],'test_variable_cache','VariableCacheController test'],
12 [['Variable/TestVariableCacheController.cpp'],'test_variable_cache','VariableCacheController test'],
13 [['Variable/TestVariable.cpp'],'test_variable','Variable test'],
13 [['Variable/TestVariable.cpp'],'test_variable','Variable test']
14 [['Variable/TestVariableSync.cpp'],'test_variable_sync','Variable synchronization test']
14 # [['Variable/TestVariableSync.cpp'],'test_variable_sync','Variable synchronization test']
15 ]
15 ]
16
16
17 amdatest_sources = [
17 amdatest_sources = [
18 'Data/DataSeriesBuilders.h',
18 'Data/DataSeriesBuilders.h',
19 'Data/DataSeriesBuilders.cpp',
19 'Data/DataSeriesBuilders.cpp',
20 'Data/DataSeriesUtils.h',
20 'Data/DataSeriesUtils.h',
21 'Data/DataSeriesUtils.cpp'
21 'Data/DataSeriesUtils.cpp'
22 ]
22 ]
23
23
24 foreach unit_test : tests
24 foreach unit_test : tests
25 test_moc_files = qt5.preprocess(moc_sources : unit_test[0])
25 test_moc_files = qt5.preprocess(moc_sources : unit_test[0])
26 test_exe = executable(unit_test[1],unit_test[0] , test_moc_files,
26 test_exe = executable(unit_test[1],unit_test[0] , test_moc_files,
27 dependencies : [sciqlop_core, qt5test],
27 dependencies : [sciqlop_core, qt5test],
28 sources : [amdatest_sources])
28 sources : [amdatest_sources])
29 test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])])
29 test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])])
30 endforeach
30 endforeach
31
31
General Comments 0
You need to be logged in to leave comments. Login now