Browse Source

Fix for CTest in versions 3.14 and greater

iss7
Trevor Irons 5 years ago
parent
commit
f0e7ddc6e5
3 changed files with 21 additions and 19 deletions
  1. 13
    13
      CMakeLists.txt
  2. 5
    3
      CTestConfig.cmake
  3. 3
    3
      Modules/FDEM1D/testing/CMakeLists.txt

+ 13
- 13
CMakeLists.txt View File

177
 
177
 
178
 project (Lemma CXX)
178
 project (Lemma CXX)
179
 
179
 
180
-if(CXXTEST_FOUND)
181
-	if (LEMMA_ENABLE_TESTING)
182
-        include (CTest)
183
-    	enable_testing()
184
-	endif()
185
-endif()
186
-
187
 # Disallow in-source build
180
 # Disallow in-source build
188
 if ("${Lemma_SOURCE_DIR}"  STREQUAL "${Lemma_BINARY_DIR}")
181
 if ("${Lemma_SOURCE_DIR}"  STREQUAL "${Lemma_BINARY_DIR}")
189
   message(FATAL_ERROR
182
   message(FATAL_ERROR
191
     "Please create a separate binary directory and run CMake there.")
184
     "Please create a separate binary directory and run CMake there.")
192
 endif()
185
 endif()
193
 
186
 
187
+if(CXXTEST_FOUND)
188
+	if (LEMMA_ENABLE_TESTING)
189
+        include (CTest)
190
+    	enable_testing()
191
+	endif()
192
+endif()
193
+
194
 ##############################
194
 ##############################
195
 # required external programs # for downloading packages
195
 # required external programs # for downloading packages
196
 ##############################
196
 ##############################
313
 
313
 
314
 #######################################################################
314
 #######################################################################
315
 # CXXTEST Framework
315
 # CXXTEST Framework
316
-#if(CXXTEST_FOUND)
317
-#	if (LEMMA_ENABLE_TESTING)
318
-#        include (CTest)
319
-    	#enable_testing()
320
-#	endif()
321
-#endif()
316
+if(CXXTEST_FOUND)
317
+	if (LEMMA_ENABLE_TESTING)
318
+        include (CTest)
319
+    	enable_testing()
320
+	endif()
321
+endif()
322
 
322
 
323
 ########################################################################
323
 ########################################################################
324
 # add a target to generate API documentation with Doxyfile.in 
324
 # add a target to generate API documentation with Doxyfile.in 

+ 5
- 3
CTestConfig.cmake View File

2
 ## Then modify the CMakeLists.txt file in the root directory of your
2
 ## Then modify the CMakeLists.txt file in the root directory of your
3
 ## project to incorporate the testing dashboard.
3
 ## project to incorporate the testing dashboard.
4
 ## # The following are required to uses Dart and the Cdash dashboard
4
 ## # The following are required to uses Dart and the Cdash dashboard
5
-##   ENABLE_TESTING()
6
-##   INCLUDE(CTest)
5
+ENABLE_TESTING()
6
+#INCLUDE(CTest)
7
+
7
 set(CTEST_PROJECT_NAME "Lemma")
8
 set(CTEST_PROJECT_NAME "Lemma")
8
 set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
9
 set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
9
 
10
 
11
 set(CTEST_DROP_SITE "my.cdash.org")
12
 set(CTEST_DROP_SITE "my.cdash.org")
12
 set(CTEST_DROP_LOCATION "/submit.php?project=Lemma")
13
 set(CTEST_DROP_LOCATION "/submit.php?project=Lemma")
13
 set(CTEST_DROP_SITE_CDASH TRUE)
14
 set(CTEST_DROP_SITE_CDASH TRUE)
14
-
15
+# CTest 3.14 requires this
16
+set(CTEST_SUBMIT_URL "my.cdash.org/submit.php?project=Lemma")

+ 3
- 3
Modules/FDEM1D/testing/CMakeLists.txt View File

6
 CXXTEST_ADD_TEST(unittest_FEM1D_SerializeCheck SerializeCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/SerializeCheck.h)
6
 CXXTEST_ADD_TEST(unittest_FEM1D_SerializeCheck SerializeCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/SerializeCheck.h)
7
 target_link_libraries(unittest_FEM1D_SerializeCheck "lemmacore" "fdem1d" "yaml-cpp")
7
 target_link_libraries(unittest_FEM1D_SerializeCheck "lemmacore" "fdem1d" "yaml-cpp")
8
 
8
 
9
-CXXTEST_ADD_TEST(benchKiHa BenchKiHa.cc ${CMAKE_CURRENT_SOURCE_DIR}/BenchKiHa.h)
10
-target_link_libraries(benchKiHa "lemmacore" "fdem1d" "yaml-cpp")
9
+#CXXTEST_ADD_TEST(benchKiHa BenchKiHa.cc ${CMAKE_CURRENT_SOURCE_DIR}/BenchKiHa.h)
10
+#target_link_libraries(benchKiHa "lemmacore" "fdem1d" "yaml-cpp")
11
 
11
 
12
 set_target_properties(unittest_FEM1D_GetNameCheck
12
 set_target_properties(unittest_FEM1D_GetNameCheck
13
 	                  unittest_FEM1D_SerializeCheck 
13
 	                  unittest_FEM1D_SerializeCheck 
14
-                      benchKiHa
14
+#                      benchKiHa
15
     PROPERTIES 
15
     PROPERTIES 
16
 	CXX_STANDARD 14
16
 	CXX_STANDARD 14
17
 	CXX_STANDARD_REQUIRED ON
17
 	CXX_STANDARD_REQUIRED ON

Loading…
Cancel
Save