-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (34 loc) · 1.19 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
cmake_minimum_required(VERSION 3.15)
project(gaalet)
set(CMAKE_CXX_STANDARD 14)
# --- Use CPM - CMake's missing package manager (https://github.com/cpm-cmake/CPM.cmake/tree/master#adding-cpm)
# download CPM.cmake
file(
DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.3/CPM.cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
EXPECTED_HASH SHA256=cc155ce02e7945e7b8967ddfaff0b050e958a723ef7aad3766d368940cb15494
)
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)
# -- Eigen is only used for vector and matrix classes in the test main.cpp
CPMAddPackage(
NAME Eigen
VERSION 3.4.0
URL https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
# Eigen's CMakelists are not intended for library use
DOWNLOAD_ONLY YES
)
include_directories(
include/cpp0x
)
add_subdirectory(cpp0x/tests)
add_subdirectory(cpp0x/examples)
add_subdirectory(cpp0x/benchmarks)
add_subdirectory(python)
add_executable(${PROJECT_NAME} main.cpp)
if(Eigen_ADDED)
target_include_directories(${PROJECT_NAME} PUBLIC ${Eigen_SOURCE_DIR})
endif()
target_link_libraries(${PROJECT_NAME} PRIVATE
${LINK_OPTIONS}
)