File tree Expand file tree Collapse file tree 5 files changed +21
-16
lines changed
host-configs/llnl/blueos_3_ppc64le_ib_p9 Expand file tree Collapse file tree 5 files changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,12 @@ if (NOT BLT_LOADED)
80
80
cmake_policy (SET CMP0076 OLD)
81
81
endif ()
82
82
83
+ # Sets CUDA_ARCHITECTURES target property based on CMAKE_CUDA_ARCHITECTURES
84
+ # Policy added in 3.18+
85
+ if (POLICY CMP0104)
86
+ cmake_policy (SET CMP0104 NEW)
87
+ endif ()
88
+
83
89
################################
84
90
# Invoke CMake Fortran setup
85
91
# if ENABLE_FORTRAN == ON
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ macro(blt_register_library)
361
361
mark_as_advanced (_BLT_${uppercase_name} _IS_OBJECT_LIBRARY)
362
362
363
363
# PGI does not support -isystem
364
- if ( (${arg_TREAT_INCLUDES_AS_SYSTEM} ) AND (NOT " ${CMAKE_CXX_COMPILER_ID} " STREQUAL "PGI" ))
364
+ if ( (${arg_TREAT_INCLUDES_AS_SYSTEM} ) AND (NOT ${C_COMPILER_FAMILY_IS_PGI} ))
365
365
set (_BLT_${uppercase_name} _TREAT_INCLUDES_AS_SYSTEM TRUE CACHE BOOL "" FORCE)
366
366
else ()
367
367
set (_BLT_${uppercase_name} _TREAT_INCLUDES_AS_SYSTEM FALSE CACHE BOOL "" FORCE)
@@ -480,7 +480,7 @@ macro(blt_patch_target)
480
480
endif ()
481
481
482
482
# PGI does not support -isystem
483
- if ( (${arg_TREAT_INCLUDES_AS_SYSTEM} ) AND (NOT " ${CMAKE_CXX_COMPILER_ID} " STREQUAL "PGI" ))
483
+ if ( (${arg_TREAT_INCLUDES_AS_SYSTEM} ) AND (NOT ${C_COMPILER_FAMILY_IS_PGI} ))
484
484
get_target_property (_target_includes ${arg_NAME} INTERFACE_INCLUDE_DIRECTORIES )
485
485
# Don't copy if the target had no include directories
486
486
if (_target_includes)
Original file line number Diff line number Diff line change @@ -255,10 +255,13 @@ macro(blt_inherit_target_info)
255
255
256
256
blt_determine_scope(TARGET ${arg_TO} OUT _scope)
257
257
258
- get_target_property (_interface_system_includes
259
- ${arg_FROM} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)
260
- if ( _interface_system_includes )
261
- target_include_directories (${arg_TO} SYSTEM ${_scope} ${_interface_system_includes} )
258
+ # PGI does not support -isystem
259
+ if (NOT ${C_COMPILER_FAMILY_IS_PGI} )
260
+ get_target_property (_interface_system_includes
261
+ ${arg_FROM} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)
262
+ if ( _interface_system_includes )
263
+ target_include_directories (${arg_TO} SYSTEM ${_scope} ${_interface_system_includes} )
264
+ endif ()
262
265
endif ()
263
266
264
267
get_target_property (_interface_includes
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.9.0" )
91
91
else ()
92
92
message (STATUS "CUDA Host Compiler: ${CUDA_HOST_COMPILER} " )
93
93
endif ()
94
+ message (STATUS "CUDA Architectures: ${CMAKE_CUDA_ARCHITECTURES} " )
94
95
message (STATUS "CUDA Include Path: ${CUDAToolkit_INCLUDE_DIRS} " )
95
96
message (STATUS "CUDA Compile Flags: ${CMAKE_CUDA_FLAGS} " )
96
97
message (STATUS "CUDA Link Flags: ${CMAKE_CUDA_LINK_FLAGS} " )
@@ -123,6 +124,7 @@ endif ()
123
124
124
125
blt_import_library(NAME blt_cuda
125
126
LINK_FLAGS "${CMAKE_CUDA_LINK_FLAGS} "
127
+ TREAT_INCLUDES_AS_SYSTEM ON
126
128
EXPORTABLE ${BLT_EXPORT_THIRDPARTY}
127
129
GLOBAL ${_blt_cuda_is_global} )
128
130
Original file line number Diff line number Diff line change 6
6
#------------------------------------------------------------------------------
7
7
# Example host-config file for using PGI and CUDA
8
8
#------------------------------------------------------------------------------
9
- set (CMAKE_CXX_COMPILER "/usr/tce/packages/pgi/pgi-20.4/bin/pgc++" CACHE PATH "" )
10
- set (CMAKE_C_COMPILER "/usr/tce/packages/pgi/pgi-20.4/bin/pgcc" CACHE PATH "" )
9
+ set (CMAKE_CXX_COMPILER "/usr/tce/packages/pgi/pgi-20.4/bin/pgc++" CACHE PATH "" )
10
+ set (CMAKE_C_COMPILER "/usr/tce/packages/pgi/pgi-20.4/bin/pgcc" CACHE PATH "" )
11
11
12
12
set (ENABLE_FORTRAN OFF CACHE BOOL "" )
13
13
set (ENABLE_MPI OFF CACHE BOOL "" )
14
14
set (ENABLE_OPENMP OFF CACHE BOOL "" )
15
15
16
16
set (ENABLE_CUDA ON CACHE BOOL "" )
17
-
18
17
set (CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-11.1.1" CACHE PATH "" )
19
- set (CMAKE_CUDA_COMPILER "${CUDA_TOOLKIT_ROOT_DIR} /bin/nvcc" CACHE PATH "" )
20
- set (CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER} CACHE PATH "" )
21
-
22
- set (CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "" )
23
-
24
- set (_cuda_arch "sm_70" )
25
- set (CMAKE_CUDA_FLAGS "-restrict -arch ${_cuda_arch} -std=c++11 --expt-extended-lambda -G" CACHE STRING "" )
18
+ set (CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "" )
19
+ set (CMAKE_CUDA_ARCHITECTURES "70" CACHE BOOL "" )
You can’t perform that action at this time.
0 commit comments