##// END OF EJS Templates
Remove unit tests of plugin manager...
Alexandre Leroux -
r73:51df0df4d852
parent child
Show More
@@ -1,149 +1,145
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)
28 28
29 29 #
30 30 # Compile the library library
31 31 #
32 32 FILE (GLOB_RECURSE MODULE_SOURCES
33 33 ${INCLUDES_DIR}/*.h
34 34 ${SOURCES_DIR}/*.c
35 35 ${SOURCES_DIR}/*.cpp
36 36 ${SOURCES_DIR}/*.h)
37 37
38 38 ADD_LIBRARY(${SQPCORE_LIBRARY_NAME} ${MODULE_SOURCES})
39 39 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
40 40 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
41 41 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME})
42 42 qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core)
43 43
44 44 # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html
45 45 # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order.
46 46 # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets
47 47 IF(BUILD_SHARED_LIBS)
48 48 SET_TARGET_PROPERTIES(${SQPCORE_LIBRARY_NAME} PROPERTIES COMPILE_DEFINITIONS "SCIQLOP_EXPORT")
49 49 ELSE()
50 50 TARGET_COMPILE_DEFINITIONS(${SQPCORE_LIBRARY_NAME} PUBLIC "SCIQLOP_STATIC_LIBRARIES")
51 51 ENDIF()
52 52
53 53 # Set the variable to parent scope so that the other projects can copy the
54 54 # dependent shared libraries
55 55 SCIQLOP_SET_TO_PARENT_SCOPE(SQPCORE_LIBRARY_NAME)
56 56
57 57 # Copy extern shared libraries to the lib folder
58 58 SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPCORE_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES})
59 59
60 60 # Add the files to the list of files to be analyzed
61 61 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
62 62 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
63 63 # Vera++ exclusion files
64 64 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
65 65 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
66 66
67 67 #
68 68 # Compile the tests
69 69 #
70 70 IF(BUILD_TESTS)
71 71 INCLUDE_DIRECTORIES(${SOURCES_DIR})
72 72 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
73 73 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
74 74 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME})
75 75
76 # Set tests resources path
77 SET(RESOURCES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/tests-resources/)
78 add_definitions(-DSCQCORE_TESTS_RESOURCES_PATH="${RESOURCES_PATH}")
79
80 76 SET(TARGETS_COV)
81 77 FOREACH( testFile ${TESTS_SOURCES} )
82 78 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
83 79 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
84 80
85 81 # Add to the list of sources files all the sources in the same
86 82 # directory that aren't another test
87 83 FILE (GLOB currentTestSources
88 84 ${testDirectory}/*.c
89 85 ${testDirectory}/*.cpp
90 86 ${testDirectory}/*.h)
91 87 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
92 88 # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
93 89
94 90 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
95 91 set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14)
96 92 set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON)
97 93 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} )
98 94 qt5_use_modules(${testName} Test)
99 95
100 96 ADD_TEST( NAME ${testName} COMMAND ${testName} )
101 97
102 98 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES})
103 99 set(Coverage_NAME ${testName})
104 100 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
105 101 LIST( APPEND TARGETS_COV ${testName}_coverage)
106 102
107 103 ENDFOREACH( testFile )
108 104
109 105 add_custom_target(coverage)
110 106
111 107 FOREACH( target_cov ${TARGETS_COV} )
112 108 add_custom_command(TARGET coverage PRE_BUILD COMMAND make ${target_cov})
113 109 ENDFOREACH( target_cov )
114 110
115 111 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
116 112 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
117 113 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
118 114 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
119 115 ENDIF(BUILD_TESTS)
120 116
121 117 #
122 118 # Set the files that must be formatted by clang-format.
123 119 #
124 120 LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES})
125 121 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
126 122
127 123 #
128 124 # Set the directories that doxygen must browse to generate the
129 125 # documentation.
130 126 #
131 127 # Source directories:
132 128 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
133 129 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
134 130 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
135 131 # Source directories to exclude from the documentation generation
136 132 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
137 133 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
138 134
139 135 #
140 136 # Set the directories with the sources to analyze and propagate the
141 137 # modification to the parent scope
142 138 #
143 139 # Source directories to analyze:
144 140 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
145 141 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
146 142 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
147 143 # Source directories to exclude from the analysis
148 144 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
149 145 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now