-
Notifications
You must be signed in to change notification settings - Fork 49
/
CMakeLists.txt
52 lines (41 loc) · 1.36 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
cmake_minimum_required (VERSION 3.14)
project (OpenMEEG VERSION 2.5.11 LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17) # use c++17
set(OpenMEEG_HEADER_INSTALLDIR include) # XXX I don't know why this should be here
# Modify where to find the modules
list(APPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/utils
${CMAKE_MODULE_PATH}
)
# OpenMEEG Configuration and needed things
if (NOT WIN32)
option(USE_MEMORY_CHECKER "Use memory checker" OFF)
if (USE_MEMORY_CHECKER)
set(CMAKE_CXX_FLAGS -fsanitize=address ${CMAKE_CXX_FLAGS})
else()
list(REMOVE_ITEM CMAKE_CXX_FLAGS "-fsanitize=address")
endif()
endif()
include(GenerateExportHeader)
include(CompilerOptions)
include(options)
include(thirdParties)
include(install) # install setup (do it before adding targets)
include(Uninstall) # install setup (do it before adding targets)
message("-- Configuring OpenMEEGConfigure.h ...")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/OpenMEEGConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/OpenMEEGConfigure.h)
# OpenMEEG stuff
add_subdirectory(OpenMEEGMaths)
add_subdirectory(OpenMEEG)
if (ENABLE_APPS)
add_subdirectory(apps)
endif()
add_subdirectory(wrapping)
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
add_subdirectory(documentation)
# OpenMEEG Export
include(cmake/Packaging.cmake)