Procházet zdrojové kódy

Added CTest/CDash configuration

add-code-of-conduct-1
Trevor Irons před 6 roky
rodič
revize
d2e368dbfe
3 změnil soubory, kde provedl 30 přidání a 10 odebrání
  1. 10
    9
      CMakeLists.txt
  2. 14
    0
      CTestConfig.cmake
  3. 6
    1
      Modules/FDEM1D/examples/EMDipEarth1D.cpp

+ 10
- 9
CMakeLists.txt Zobrazit soubor

@@ -84,14 +84,6 @@ if (LEMMA_ENABLE_TESTING)
84 84
     find_package (CxxTest QUIET)   # Unit testing 
85 85
 endif()
86 86
 
87
-#######################################################################
88
-# CXXTEST Framework
89
-if(CXXTEST_FOUND)
90
-	if (LEMMA_ENABLE_TESTING)
91
-    	#include_directories(${CXXTEST_INCLUDE_DIR}) # Add this in testing CMakeLists.txt instead, cleaner
92
-    	enable_testing()
93
-	endif()
94
-endif()
95 87
 
96 88
 ## Optional Dependencies
97 89
 if ( NOT Eigen3_FOUND OR 
@@ -296,11 +288,20 @@ include_directories ("${CMAKE_INSTALL_PREFIX}/include/")
296 288
 link_directories ("${CMAKE_INSTALL_PREFIX}/lib/")
297 289
 
298 290
 
299
-
300 291
 ########################################################################
301 292
 # Build Modules
302 293
 add_subdirectory (Modules) 
303 294
 
295
+#######################################################################
296
+# CXXTEST Framework
297
+if(CXXTEST_FOUND)
298
+	if (LEMMA_ENABLE_TESTING)
299
+        include (CTest)
300
+    	#include_directories(${CXXTEST_INCLUDE_DIR}) # Add this in testing CMakeLists.txt instead, cleaner
301
+    	#enable_testing()
302
+	endif()
303
+endif()
304
+
304 305
 ########################################################################
305 306
 # add a target to generate API documentation with Doxyfile.in 
306 307
 # ALL make documentation build by default if possible

+ 14
- 0
CTestConfig.cmake Zobrazit soubor

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

+ 6
- 1
Modules/FDEM1D/examples/EMDipEarth1D.cpp Zobrazit soubor

@@ -109,12 +109,17 @@ int main() {
109 109
 	std::cout << receivers->GetEfield(0,0) << std::endl;
110 110
 	receivers->ClearFields();
111 111
     */
112
+    auto lc = receivers->GetEfield(0,0);
112 113
 
113
- #ifdef NOKIHALEE_EM1D
114
+ #ifdef KIHALEE_EM1D
115
+	receivers->ClearFields();
114 116
     std::cout << "\nFORTRAN\n";
115 117
  	EmEarth->MakeCalc();
118
+    auto fc = receivers->GetEfield(0,0);
116 119
 // 	std::cout << receivers->GetHfield(0,0) << std::endl;
117 120
  	std::cout << receivers->GetEfield(0,0) << std::endl;
121
+
122
+    std::cout << "Difference norm |" << (lc - fc).norm() << "|" << std::endl;
118 123
  #endif
119 124
 
120 125
 }

Načítá se…
Zrušit
Uložit