forked from SCOREC/pcms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (28 loc) · 1.01 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
cmake_minimum_required(VERSION 3.19)
project(wdm_coupling VERSION 0.0.2 LANGUAGES C CXX)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
option(WDMCPL_ENABLE_ASAN "enable address sanitizer" OFF)
set(WDMCPL_HAS_ASAN OFF)
if(WDMCPL_ENABLE_ASAN AND CMAKE_COMPILER_IS_GNUCXX MATCHES 1)
set(WDMCPL_HAS_ASAN ON)
endif()
set(MPI_CXX_SKIP_MPICXX ON)
find_package(MPI REQUIRED)
find_package(redev 4.0.0 REQUIRED)
message(STATUS "Found redev: ${redev_DIR} (found version ${redev_VERSION})")
find_package(Omega_h REQUIRED VERSION 10)
message(STATUS "Found Omega_h: ${Omega_h_DIR} (found version ${Omega_h_VERSION})")
if(NOT Omega_h_USE_MPI)
message(FATAL_ERROR "Omega_h must be built with MPI enabled.")
endif()
## use pkgconfig since the fftw autoconf install produces
## broken cmake config files
## https://github.com/FFTW/fftw3/issues/130
find_package(PkgConfig REQUIRED)
pkg_check_modules(fftw REQUIRED IMPORTED_TARGET fftw3>=3.3)
add_subdirectory(src)
include(CTest)
if(BUILD_TESTING)
add_subdirectory(test)
endif()