-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
48 lines (37 loc) · 1.12 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
PROJECT(QUANT_PDE)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
# Install
SET(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true)
INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/QuantPDE DESTINATION include)
# C++11
SET(CMAKE_CXX_STANDARD 11)
# Module path
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
# Eigen
FIND_PACKAGE(Eigen3 REQUIRED)
INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})
# JsonCpp
FIND_PACKAGE(JsonCpp)
IF(JSONCPP_FOUND)
INCLUDE_DIRECTORIES(${JSONCPP_INCLUDE_DIR})
ENDIF()
# QuantPDE
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
# Set appropriate optimization flags
# For debugging, use `cmake -DCMAKE_BUILD_TYPE=Debug .`
SET(CMAKE_BUILD_TYPE Release)
# Where to output binaries
SET(PROJECT_BINARY_DIR ${PROJECT_SOURCE_DIR}/bin)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
ADD_SUBDIRECTORY(examples)
ADD_SUBDIRECTORY(examples/hjbqvi)
# Uncomment to include experimental binaries
#ADD_SUBDIRECTORY(examples/experimental)
# Documentation
FIND_PACKAGE(Doxygen)
IF(DOXYGEN_FOUND)
ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE}
${PROJECT_SOURCE_DIR}/Doxyfile
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
ENDIF(DOXYGEN_FOUND)