-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
98 lines (75 loc) · 2.62 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
91
92
93
94
95
96
97
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
INCLUDE(cmake/base.cmake)
#INCLUDE(cmake/boost.cmake)
#INCLUDE(cmake/eigen.cmake)
#INCLUDE(cmake/python.cmake)
INCLUDE(cmake/lapack.cmake)
INCLUDE(cmake/ide.cmake)
INCLUDE(cmake/apple.cmake)
include(cmake/test.cmake)
PROJECT(expokit)
SET(PROJECT_NAME expokit)
SET(PROJECT_VERSION 1.0.0)
SET(PROJECT_DESCRIPTION "C Library for computing matrix exponentials and related quantities")
SET(PROJECT_URL "https://github.com/andreadelprete/expokit-cpp")
OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" OFF)
SET(DOXYGEN_USE_MATHJAX YES)
# Handle APPLE Cmake policy
IF(APPLE)
APPLY_DEFAULT_APPLE_CONFIGURATION()
ENDIF(APPLE)
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
SET(CMAKE_VERBOSE_MAKEFILE True)
SETUP_PROJECT()
IF(WIN32)
SET(LINK copy_if_different)
ELSE(WIN32)
SET(LINK create_symlink)
ENDIF(WIN32)
# ----------------------------------------------------
# --- DEPENDENCIES -----------------------------------
# ----------------------------------------------------
ADD_DEFINITIONS(-DEIGEN_RUNTIME_NO_MALLOC)
ADD_DEFINITIONS(-DPROFILERYES)
# uncomment these lines to use LAPACK
#SEARCH_FOR_LAPACK()
#INCLUDE_DIRECTORIES(SYSTEM ${LAPACK_INCLUDE_DIRS})
ADD_REQUIRED_DEPENDENCY("f2c")
ADD_REQUIRED_DEPENDENCY("eigen3")
# Path to boost headers
#INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
# ----------------------------------------------------
# --- INCLUDE ----------------------------------------
# ----------------------------------------------------
SET(HEADERS
include/clock.h
include/dgchbv.h
include/dgexpv.h
include/dgpadm.h
include/expokit.h
include/MatrixExponential.hpp
include/MatExpIntegral.hpp
include/LDSUtility.hpp
include/BalancingMethods.hpp
include/utils/stop-watch.h
include/utils/Stdafx.h
)
#LIST(REMOVE_DUPLICATES HEADERS)
SET(HEADERS_FULL_PATH "")
FOREACH(header ${HEADERS})
LIST(APPEND HEADERS_FULL_PATH "${CMAKE_SOURCE_DIR}/${header}")
GET_FILENAME_COMPONENT(headerName ${header} NAME)
GET_FILENAME_COMPONENT(headerPath ${header} PATH)
INSTALL(FILES ${${PROJECT_NAME}_SOURCE_DIR}/${header}
DESTINATION ${CMAKE_INSTALL_PREFIX}/${headerPath}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
ENDFOREACH(header ${HEADERS})
# --- MAIN LIBRARY -------------------------------------------------------------
ADD_SUBDIRECTORY(src)
# --- TESTS -------------------------------------------------------------
ADD_SUBDIRECTORY(tests)
# --- PACKAGING ----------------------------------------------------------------
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
SETUP_PROJECT_FINALIZE()
add_subdirectory(run)