-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (32 loc) · 1.18 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
cmake_minimum_required(VERSION 3.10)
# set c++ standard
set(CMAKE_CXX_STANDARD 17)
# set general compiler flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Werror -Wpedantic")
# CMake useful directories
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Spike)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Spike)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
# Project name and version
project("Spike")
set(VERSION 0.1)
# add the cmake path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# find FFTW, gsl, mpi
find_package(FFTW REQUIRED)
find_package(GSL REQUIRED)
find_package(MPI REQUIRED)
# find boost package
set(Boost_NO_BOOST_CMAKE ON)
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
find_package(Boost COMPONENTS unit_test_framework program_options filesystem system thread log REQUIRED)
# include directories
include_directories(${PROJECT_SOURCE_DIR})
# add catch2
add_library(catch2 INTERFACE)
target_include_directories(catch2 INTERFACE ${PROJECT_SOURCE_DIR}/include)
# directories
add_subdirectory("Spike")
add_subdirectory("app")
add_subdirectory("test")