-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
90 lines (75 loc) · 3.77 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright 2015, Benjamin Chrétien, CNRS-LIRMM.
#
# This file is part of roboptim-core.
# roboptim-core is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# roboptim-core is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Lesser Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with roboptim-core. If not, see <http://www.gnu.org/licenses/>.
# Requires at least CMake 2.8 to configure the package.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/lapack.cmake)
INCLUDE(cmake/cpack.cmake)
INCLUDE(cmake/eigen.cmake)
SET(PROJECT_NAME roboptim-core-manifold)
SET(PROJECT_DESCRIPTION "RobOptim Core - manifold support")
SET(PROJECT_URL "http://github.com/roboptim/roboptim-core-manifold")
SET(PROJECT_DEBUG_POSTFIX "_d")
SET(HEADERS
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/descriptive-wrapper.hh
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/descriptive-wrapper.hxx
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/function-on-manifold.hh
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/function-on-manifold.hxx
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/manifold-desc.hh
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/manifold-desc.hxx
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/manifold-map.hh
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/problem-on-manifold.hh
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/problem-on-manifold.hxx
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/manifold-problem-factory.hh
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/manifold-problem-factory.hxx
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/manifold-merger.hh
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/wrapper-on-manifold.hh
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/wrapper-on-manifold.hxx
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/sum-on-manifold.hh
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/decorator/sum-on-manifold.hxx
${CMAKE_SOURCE_DIR}/include/roboptim/core/manifold-map/util.hh
)
SETUP_PROJECT()
# If compiler support symbol visibility, enable it.
INCLUDE(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG(-fvisibility=hidden HAS_VISIBILITY)
IF(HAS_VISIBILITY)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
ENDIF()
CHECK_C_COMPILER_FLAG(-ferror-limit=1 HAS_ERROR_LIMIT)
IF(HAS_ERROR_LIMIT)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ferror-limit=1")
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -O1 -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
# Search for dependencies.
SET(BOOST_COMPONENTS
date_time filesystem system thread program_options unit_test_framework)
SEARCH_FOR_BOOST()
ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.2.0")
ADD_REQUIRED_DEPENDENCY("roboptim-core >= 3.2")
ADD_REQUIRED_DEPENDENCY("manifolds" "manifolds_d")
HEADER_INSTALL("${HEADERS}")
OPTION(DISABLE_TESTS "Disable test programs" OFF)
ADD_SUBDIRECTORY(src)
IF(NOT DISABLE_TESTS)
ADD_SUBDIRECTORY(tests)
ELSE()
MESSAGE(WARNING
"Tests should only be disabled for speficic cases. Do it at your own risk.")
ENDIF()
SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_CPACK()