-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
59 lines (48 loc) · 1.83 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This file is part of AngstromCube under MIT License
#
# CMake file for AngstromCube
#
cmake_minimum_required(VERSION 3.21)
project(AngstromCube VERSION 0.9)
# Options
option(HAS_MKL "Using the Intel Math Kernel Library MKL" ON )
option(HAS_UNIT_TESTS "All modules offer self-tests (recommended)" ON )
option(HAS_MPI "Using the Message Passing Interface MPI" ON )
option(HAS_DEVEL "Include experimental features" ON )
option(HAS_RAPIDXML "Using the 3rd party XML parser RapidXML" ON )
option(HAS_RAPIDJSON "Using the 3rd party JSON parser RapidJSON" OFF) ### errors
option(HAS_FFTW "Using the Fast Fourier Transform FFTW" OFF) ### does not work yet
option(HAS_OPENMP "Using OpenMP to accelerate a43" ON )
option(HAS_TFQMRGPU "Using the header-only version of tfQMRgpu" ON )
find_package(CUDA)
if(CUDA_FOUND)
option(HAS_CUDA "Using the CUDA programming model for GPUs" ON )
else(CUDA_FOUND)
option(HAS_CUDA "Using the CUDA programming model for GPUs" OFF)
endif(CUDA_FOUND)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
if(APPLE)
set(CMAKE_INSTALL_RPATH "@executable_path/../lib")
elseif(UNIX)
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
endif()
# help debugging
set(CMAKE_VERBOSE_MAKEFILE ON)
if(HAS_MKL)
# add MKL (Intel Math Kernel Library)
unset(DPCPP_COMPILER) ## do I need this?
find_package(MKL REQUIRED)
include(CMakeFindDependencyMacro)
# threaded MKL?
find_dependency(OpenMP 3.0 REQUIRED)
endif(HAS_MKL)
# default installation paths
include(GNUInstallDirs)
# external dependencies
add_subdirectory(external)
# include debugging symbols when compiling
set(CMAKE_BUILD_TYPE Debug)
# enter source folder
add_subdirectory(src)