-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (35 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
CMake_minimum_required (VERSION 3.8)
project (THC++)
enable_testing()
include(CTest)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_STANDARD 11)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0")
MESSAGE(STATUS "Using new cmake policies")
cmake_policy(SET CMP0074 NEW)
cmake_policy(SET CMP0075 NEW)
endif(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0")
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMake)
MESSAGE(STATUS "Setting MPI executable: ${MPIEXEC_EXECUTABLE}")
MESSAGE(STATUS "Setting MPI numproc flag: ${MPIEXEC_NUMPROC_FLAG}")
include_directories("${PROJECT_SOURCE_DIR}")
add_library(Catch INTERFACE)
target_include_directories(Catch INTERFACE ${YOUR_CATCH_INCLUDE_DIR})
find_package(HDF5 COMPONENTS CXX)
find_package(FFTW)
if (FFTW_FOUND)
message(STATUS "FFTW include ${FFTW_INCLUDES}")
include_directories(${FFTW_INCLUDES})
endif (FFTW_FOUND)
include(hdf5)
include(options_wrappers)
include(math_libs)
if (MPI_FOUND)
include_directories(${MPI_INCLUDE_DIRS})
endif (MPI_FOUND)
add_subdirectory(src)
add_subdirectory(tests)