-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
65 lines (50 loc) · 2.04 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
cmake_minimum_required(VERSION 3.0)
enable_testing()
project(satyr)
# ==============================================================================
# Version information
set(SATYR_MAJOR_VERSION "0")
set(SATYR_MINOR_VERSION "0")
set(SATYR_PATCH_VERSION "0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z -fconcepts -fopenmp-simd")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
option(WITH_BLAS_LAPACK "Integrate with BLAS and LAPACK" OFF)
option(WITH_JEMALLOC "Use jemalloc for memory allocation." OFF)
# ==============================================================================
# Configure TBB
set(SATYR_WITH_TBB OFF)
if (WITH_TBB)
set(SATYR_WITH_TBB ON)
endif()
# ==============================================================================
# Configure BLAS and LAPACK
set(SATYR_WITH_BLAS_LAPACK OFF)
if (WITH_BLAS_LAPACK)
set(SATYR_WITH_BLAS_LAPACK ON)
include_directories(SYSTEM 3rd_party/netlib/include)
install(DIRECTORY 3rd_party/netlib/include/satyr/ DESTINATION include/satyr
FILES_MATCHING PATTERN "*.h")
endif()
# ==============================================================================
# Configure jemalloc
set(SATYR_WITH_JEMALLOC OFF)
if (WITH_JEMALLOC)
set(SATYR_WITH_JEMALLOC ON)
endif()
# ==============================================================================
# Set up config files
configure_file(config.h.in include/satyr/config.h)
configure_file(version.h.in include/satyr/version.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/satyr
DESTINATION include)
# ==============================================================================
# Set up satyr modules
set(MODULE_LIST core k_array n_array linear_algebra)
foreach(MODULE ${MODULE_LIST})
include_directories(${MODULE}/include)
install(DIRECTORY ${MODULE}/include/satyr/ DESTINATION include/satyr
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${MODULE}/include/satyr/ DESTINATION include/satyr
FILES_MATCHING PATTERN "*.def")
endforeach()