-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
42 lines (33 loc) · 923 Bytes
/
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
# CMakeLists.txt
#
# Author: Fabian Meyer
# Created On: 12 Jul 2019
cmake_minimum_required(VERSION 3.5)
project(gdcpp)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
endif(CMAKE_COMPILER_IS_GNUCXX)
# find OpenMP
find_package(OpenMP)
if(OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif(OPENMP_FOUND)
# find_package(Eigen3 REQUIRED)
add_subdirectory(dep)
include_directories(
include
${EIGEN3_INCLUDE_DIR}
)
install(FILES "include/gdcpp.h"
DESTINATION include)
if(${BUILD_TESTS})
# Compile tests
add_subdirectory(test)
endif(${BUILD_TESTS})
if(${BUILD_EXAMPLES})
add_subdirectory(examples)
endif(${BUILD_EXAMPLES})