-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
70 lines (56 loc) · 1.72 KB
/
Copy pathCMakeLists.txt
File metadata and controls
70 lines (56 loc) · 1.72 KB
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
cmake_minimum_required(VERSION 3.10.2)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
option(BuildTest "BuildTest" OFF)
option(Kaskade "Kaskade" OFF)
option(Dolfin "Dolfin" OFF)
option(dealII "dealII" OFF)
option(Logging "Logging" ON)
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake)
include(BuildConfigurations)
if(dealII)
find_package(deal.II 8.4 QUIET
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)
DEAL_II_INITIALIZE_CACHED_VARIABLES()
endif()
project(spacy VERSION 0.4.0 LANGUAGES CXX)
if(Logging)
add_definitions(-DSPACY_ENABLE_LOGGING)
endif()
if(Dolfin)
find_package(DOLFIN CONFIG REQUIRED)
include_directories(${DOLFIN_INCLUDE_DIRS})
include_directories(SYSTEM ${DOLFIN_3RD_PARTY_INCLUDE_DIRS})
endif()
find_package(Eigen3)
if(Eigen3_FOUND)
include_directories(${EIGEN3_INCLUDE_DIR})
endif()
add_subdirectory(Spacy)
if(BuildTest)
add_subdirectory(Test)
endif()
# add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
set(DOC_DIR "doc" CACHE STRING "Output directory for the doxygen documentation")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)
### Examples
if(Kaskade)
add_subdirectory(Examples/Kaskade)
endif()
if(Eigen3_FOUND)
find_package(FunG REQUIRED)
if(FunG_FOUND)
add_subdirectory(Examples/Eigen_FunG)
endif()
endif()