|
@@ -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})
|