forked from glotzerlab/hoomd-blue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMake_preprocessor_flags.cmake
46 lines (36 loc) · 1.08 KB
/
CMake_preprocessor_flags.cmake
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
# Maintainer: joaander
# This sets the preprocessor definitions after all build options have been set appropriately
if (SINGLE_PRECISION)
add_definitions (-DSINGLE_PRECISION)
# disable for now, only support single precision FFT
#else(SINGLE_PRECISION)
# add_definitions (-Dkiss_fft_scalar=double)
endif(SINGLE_PRECISION)
if (ENABLE_CUDA)
add_definitions (-DENABLE_CUDA)
if (ENABLE_NVTOOLS)
add_definitions(-DENABLE_NVTOOLS)
endif()
if(ALWAYS_USE_MANAGED_MEMORY)
add_definitions(-DALWAYS_USE_MANAGED_MEMORY)
endif()
endif (ENABLE_CUDA)
################################
## thread safe compiling
add_definitions(-D_REENTRANT)
if (ENABLE_MPI)
add_definitions (-DENABLE_MPI)
if (ENABLE_MPI_CUDA)
add_definitions (-DENABLE_MPI_CUDA)
endif(ENABLE_MPI_CUDA)
endif(ENABLE_MPI)
# define Eigen should be MPL 2 only
add_definitions(-DEIGEN_MPL2_ONLY)
# export cusolver availability
if (CUSOLVER_AVAILABLE)
add_definitions(-DCUSOLVER_AVAILABLE)
endif()
# export TBB compile flag
if (ENABLE_TBB)
add_definitions(-DENABLE_TBB)
endif()