-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
41 lines (31 loc) · 1.2 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.5)
include(FindPackageHandleStandardArgs)
project(qnets LANGUAGES CXX VERSION 0.0.1)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${USER_CXX_FLAGS}")
if (USE_COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
endif ()
# find packages
message(STATUS "Configured GSL_ROOT_DIR: ${GSL_ROOT_DIR}")
if (USE_OPENMP)
find_package(OpenMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -DOPENMP")
message(STATUS "OPENMP_LIBRARY_PATHS: ${OpenMP_CXX_LIBRARY}")
message(STATUS "OPENMP_LIBRARIES: ${OpenMP_CXX_LIBRARIES}")
endif ()
find_package(GSL)
message(STATUS "GSL_INCLUDE_DIRS: ${GSL_INCLUDE_DIRS}")
message(STATUS "GSL_LIBRARIES: ${GSL_LIBRARIES}")
message(STATUS "Configured CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
message(STATUS "Configured CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
# set header / library paths
include_directories(include/ "${GSL_INCLUDE_DIRS}") # headers
enable_testing()
# continue with subdirectories
add_subdirectory(src)
add_subdirectory(test)
add_subdirectory(benchmark)
add_subdirectory(examples)