Browse Source

Fixes for boost, yaml, and eigen upstream updates

submodule
Trevor Irons 7 years ago
parent
commit
35b9939bf8

+ 19
- 16
CMakeLists.txt View File

18
   message(FATAL_ERROR "Lemma requires that git is installed and in the path of your machine")
18
   message(FATAL_ERROR "Lemma requires that git is installed and in the path of your machine")
19
 endif(NOT HAVEGIT)
19
 endif(NOT HAVEGIT)
20
 
20
 
21
-FIND_PROGRAM(HAVEHG hg
22
-  PATHS /usr/bin/ /bin ENV PATH NO_DEFAULT_PATH
23
-)
24
-
25
 option(BUILD_SHARED_LIBS OFF)
21
 option(BUILD_SHARED_LIBS OFF)
26
 if(BUILD_SHARED_LIBS)
22
 if(BUILD_SHARED_LIBS)
27
 	set(LABEL_SUFFIX "shared")
23
 	set(LABEL_SUFFIX "shared")
29
 	set(LABEL_SUFFIX "static")
25
 	set(LABEL_SUFFIX "static")
30
 endif()
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
 # External Projects
36
 # External Projects
44
 #	# do nothing
43
 #	# do nothing
45
 #	include_directories(EIGEN3_INCLUDE_DIR)
44
 #	include_directories(EIGEN3_INCLUDE_DIR)
46
 #else() 
45
 #else() 
46
+
47
+FIND_PROGRAM( HAVEHG hg
48
+  PATHS /usr/bin/ /bin ENV PATH NO_DEFAULT_PATH
49
+)
47
 if (HAVEHG)
50
 if (HAVEHG)
48
 	ExternalProject_Add(EIGEN
51
 	ExternalProject_Add(EIGEN
49
 	HG_REPOSITORY  "https://bitbucket.org/eigen/eigen/"
52
 	HG_REPOSITORY  "https://bitbucket.org/eigen/eigen/"
50
 	UPDATE_COMMAND ""
53
 	UPDATE_COMMAND ""
51
-	HG_TAG "default"
54
+	HG_TAG "3.3.2" #"default"
52
    	PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
55
    	PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
53
    	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
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
    	PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
63
    	PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/eigen
60
    	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
64
    	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
61
-)
65
+	)	
62
 ENDIF()
66
 ENDIF()
63
 include_directories ("${CMAKE_INSTALL_PREFIX}/include/eigen3")
67
 include_directories ("${CMAKE_INSTALL_PREFIX}/include/eigen3")
64
-#endif()
65
 
68
 
66
 # Yaml-cpp, this library is used extensively for serialisation of classes (class persistence) 
69
 # Yaml-cpp, this library is used extensively for serialisation of classes (class persistence) 
67
 ExternalProject_Add(YAML-CPP
70
 ExternalProject_Add(YAML-CPP
68
 	GIT_REPOSITORY  "https://github.com/jbeder/yaml-cpp.git"
71
 	GIT_REPOSITORY  "https://github.com/jbeder/yaml-cpp.git"
69
-	GIT_TAG  "master"
72
+	GIT_TAG   "master" #"release-0.5.3" #"master"
70
 	UPDATE_COMMAND ""
73
 	UPDATE_COMMAND ""
71
 	PATCH_COMMAND ""
74
 	PATCH_COMMAND ""
72
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
75
     PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
177
 if (LEMMA_USE_BOOST)
180
 if (LEMMA_USE_BOOST)
178
 	find_package(Boost
181
 	find_package(Boost
179
   		1.58.0                         # Minimum or EXACT version e.g. 1.36.0
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
 	if(Boost_FOUND)
185
 	if(Boost_FOUND)
183
   		include_directories(${Boost_INCLUDE_DIRS})
186
   		include_directories(${Boost_INCLUDE_DIRS})

+ 1
- 0
Modules/FDEM1D/CMakeLists.txt View File

9
 )
9
 )
10
 
10
 
11
 # Linking
11
 # Linking
12
+target_link_libraries(fdem1d "yaml-cpp")
12
 target_link_libraries(fdem1d "lemmacore")
13
 target_link_libraries(fdem1d "lemmacore")
13
 
14
 
14
 if ( KIHA_EM1D )
15
 if ( KIHA_EM1D )

+ 2
- 2
Modules/FDEM1D/include/KernelEM1DSpec.h View File

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

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

1
 include_directories(${CXXTEST_INCLUDE_DIR})
1
 include_directories(${CXXTEST_INCLUDE_DIR})
2
 
2
 
3
 CXXTEST_ADD_TEST(unittestFEM1D_GetNameCheck GetNameCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/GetNameCheck.h)
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
 CXXTEST_ADD_TEST(unittestFEM1D_SerializeCheck SerializeCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/SerializeCheck.h)
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…
Cancel
Save