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