File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -5,12 +5,21 @@ project(spinwalk LANGUAGES CUDA CXX)
5
5
6
6
# Find HDF5
7
7
find_package (HDF5 REQUIRED COMPONENTS CXX )
8
+
8
9
# Find OpenMP
9
10
find_package (OpenMP REQUIRED )
11
+
10
12
# Boost
11
- find_package (Boost CONFIG COMPONENTS program_options log log_setup REQUIRED )
13
+ if (POLICY CMP0167 )
14
+ cmake_policy (SET CMP0167 OLD )
15
+ endif ()
16
+ find_package (Boost COMPONENTS program_options log log_setup REQUIRED )
17
+
12
18
# FindCUDA module
13
- # find_package(CUDA)
19
+ if (POLICY CMP0146 )
20
+ cmake_policy (SET CMP0146 OLD )
21
+ endif ()
22
+ find_package (CUDA )
14
23
# find_package(CUDAToolkit)
15
24
# Find TBB
16
25
find_package (TBB REQUIRED )
@@ -25,9 +34,7 @@ if(CUDA_FOUND)
25
34
# Set CUDA architecture (change according to your GPU)
26
35
# set(CUDA_ARCH "-arch=sm_75" CACHE STRING "CUDA architecture")
27
36
# set_property(TARGET ${target} PROPERTY CUDA_ARCHITECTURES native)
28
- # set_property(TARGET ${target} PROPERTY CUDA_ARCHITECTURES 70 75 80 86 90)
29
37
set (CMAKE_CUDA_ARCHITECTURES 75 86 89 )
30
- # set_property(TARGET ${target} PROPERTY CUDA_SEPARABLE_COMPILATION ON)
31
38
# Add CUDA and OpenMP flags
32
39
set (CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${CUDA_ARCH} -Xcompiler=${OpenMP_CXX_FLAGS} " )
33
40
else ()
You can’t perform that action at this time.
0 commit comments