Преглед изворни кода

Fixes for boost, yaml, and eigen upstream updates

submodule
Trevor Irons пре 7 година
родитељ
комит
35b9939bf8

+ 19
- 16
CMakeLists.txt Прегледај датотеку

@@ -18,10 +18,6 @@ if(NOT HAVEGIT)
18 18
   message(FATAL_ERROR "Lemma requires that git is installed and in the path of your machine")
19 19
 endif(NOT HAVEGIT)
20 20
 
21
-FIND_PROGRAM(HAVEHG hg
22
-  PATHS /usr/bin/ /bin ENV PATH NO_DEFAULT_PATH
23
-)
24
-
25 21
 option(BUILD_SHARED_LIBS OFF)
26 22
 if(BUILD_SHARED_LIBS)
27 23
 	set(LABEL_SUFFIX "shared")
@@ -29,9 +25,12 @@ else()
29 25
 	set(LABEL_SUFFIX "static")
30 26
 endif()
31 27
 
32
-if (NOT CMAKE_BUILD_TYPE)
33
-  set(CMAKE_BUILD_TYPE "Release")
34
-endif()
28
+if(NOT CMAKE_BUILD_TYPE)
29
+   set(CMAKE_BUILD_TYPE "Release" CACHE STRING
30
+       "Choose the type of build, options are: Debug Release
31
+        RelWithDebInfo MinSizeRel."
32
+       FORCE)
33
+endif(NOT CMAKE_BUILD_TYPE)
35 34
 
36 35
 ###################
37 36
 # External Projects
@@ -44,29 +43,33 @@ include(ExternalProject)
44 43
 #	# do nothing
45 44
 #	include_directories(EIGEN3_INCLUDE_DIR)
46 45
 #else() 
46
+
47
+FIND_PROGRAM( HAVEHG hg
48
+  PATHS /usr/bin/ /bin ENV PATH NO_DEFAULT_PATH
49
+)
47 50
 if (HAVEHG)
48 51
 	ExternalProject_Add(EIGEN
49 52
 	HG_REPOSITORY  "https://bitbucket.org/eigen/eigen/"
50 53
 	UPDATE_COMMAND ""
51
-	HG_TAG "default"
54
+	HG_TAG "3.3.2" #"default"
52 55
    	PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
53 56
    	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
54 57
 )
55
-ELSE() 
56
-# Stable Eigen
57
-ExternalProject_Add(EIGEN
58
-   	URL "http://bitbucket.org/eigen/eigen/get/default.tar.gz" # tip from repo
58
+ELSE()
59
+	# Use Stable Eigen instead
60
+	ExternalProject_Add(EIGEN
61
+	#URL "http://bitbucket.org/eigen/eigen/get/default.tar.gz" # tip from repo
62
+    URL "http://bitbucket.org/eigen/eigen/get/3.3.2.tar.gz"
59 63
    	PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
60 64
    	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
61
-)
65
+	)	
62 66
 ENDIF()
63 67
 include_directories ("${CMAKE_INSTALL_PREFIX}/include/eigen3")
64
-#endif()
65 68
 
66 69
 # Yaml-cpp, this library is used extensively for serialisation of classes (class persistence) 
67 70
 ExternalProject_Add(YAML-CPP
68 71
 	GIT_REPOSITORY  "https://github.com/jbeder/yaml-cpp.git"
69
-	GIT_TAG  "master"
72
+	GIT_TAG   "master" #"release-0.5.3" #"master"
70 73
 	UPDATE_COMMAND ""
71 74
 	PATCH_COMMAND ""
72 75
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
@@ -177,7 +180,7 @@ option (LEMMA_USE_BOOST "Boost is required by gaussian quadrature classes" OFF)
177 180
 if (LEMMA_USE_BOOST)
178 181
 	find_package(Boost
179 182
   		1.58.0                         # Minimum or EXACT version e.g. 1.36.0
180
-  		COMPONENTS math                # Boost libraries by their canonical name
183
+#  		COMPONENTS math                # Boost libraries by their canonical name
181 184
 	)  
182 185
 	if(Boost_FOUND)
183 186
   		include_directories(${Boost_INCLUDE_DIRS})

+ 1
- 0
Modules/FDEM1D/CMakeLists.txt Прегледај датотеку

@@ -9,6 +9,7 @@ set_target_properties(fdem1d PROPERTIES
9 9
 )
10 10
 
11 11
 # Linking
12
+target_link_libraries(fdem1d "yaml-cpp")
12 13
 target_link_libraries(fdem1d "lemmacore")
13 14
 
14 15
 if ( KIHA_EM1D )

+ 2
- 2
Modules/FDEM1D/include/KernelEM1DSpec.h Прегледај датотеку

@@ -132,7 +132,7 @@ namespace Lemma {
132 132
             }
133 133
 
134 134
             /** Returns the name of the underlying class, similiar to Python's type */
135
-            virtual std::string GetName() const; 
135
+            virtual std::string GetName() const;
136 136
 
137 137
         protected:
138 138
 
@@ -214,7 +214,7 @@ namespace Lemma {
214 214
                -1.e0,  1.e0,
215 215
                 1.e0, -1.e0,
216 216
                -1.e0, -1.e0 ).finished();
217
-            
217
+
218 218
     template<EMMODE Mode, int Ikernel, DIPOLE_LOCATION Isource, DIPOLE_LOCATION Irecv>
219 219
     std::string KernelEM1DSpec<Mode, Ikernel, Isource, Irecv>::GetName() const {
220 220
         return CName;

+ 2
- 2
Modules/FDEM1D/testing/CMakeLists.txt Прегледај датотеку

@@ -1,7 +1,7 @@
1 1
 include_directories(${CXXTEST_INCLUDE_DIR})
2 2
 
3 3
 CXXTEST_ADD_TEST(unittestFEM1D_GetNameCheck GetNameCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/GetNameCheck.h)
4
-target_link_libraries(unittestFEM1D_GetNameCheck "lemmacore" "fdem1d")
4
+target_link_libraries(unittestFEM1D_GetNameCheck "lemmacore" "fdem1d" "yaml-cpp")
5 5
 
6 6
 CXXTEST_ADD_TEST(unittestFEM1D_SerializeCheck SerializeCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/SerializeCheck.h)
7
-target_link_libraries(unittestFEM1D_SerializeCheck "lemmacore" "fdem1d")
7
+target_link_libraries(unittestFEM1D_SerializeCheck "lemmacore" "fdem1d" "yaml-cpp")

Loading…
Откажи
Сачувај