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)
8080 cmake_policy (SET CMP0076 OLD)
8181 endif ()
8282
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+
8389 ################################
8490 # Invoke CMake Fortran setup
8591 # if ENABLE_FORTRAN == ON
Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ macro(blt_register_library)
361361 mark_as_advanced (_BLT_${uppercase_name} _IS_OBJECT_LIBRARY)
362362
363363 # 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} ))
365365 set (_BLT_${uppercase_name} _TREAT_INCLUDES_AS_SYSTEM TRUE CACHE BOOL "" FORCE)
366366 else ()
367367 set (_BLT_${uppercase_name} _TREAT_INCLUDES_AS_SYSTEM FALSE CACHE BOOL "" FORCE)
@@ -480,7 +480,7 @@ macro(blt_patch_target)
480480 endif ()
481481
482482 # 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} ))
484484 get_target_property (_target_includes ${arg_NAME} INTERFACE_INCLUDE_DIRECTORIES )
485485 # Don't copy if the target had no include directories
486486 if (_target_includes)
Original file line number Diff line number Diff line change @@ -255,10 +255,13 @@ macro(blt_inherit_target_info)
255255
256256 blt_determine_scope(TARGET ${arg_TO} OUT _scope)
257257
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 ()
262265 endif ()
263266
264267 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" )
9191else ()
9292 message (STATUS "CUDA Host Compiler: ${CUDA_HOST_COMPILER} " )
9393endif ()
94+ message (STATUS "CUDA Architectures: ${CMAKE_CUDA_ARCHITECTURES} " )
9495message (STATUS "CUDA Include Path: ${CUDAToolkit_INCLUDE_DIRS} " )
9596message (STATUS "CUDA Compile Flags: ${CMAKE_CUDA_FLAGS} " )
9697message (STATUS "CUDA Link Flags: ${CMAKE_CUDA_LINK_FLAGS} " )
@@ -123,6 +124,7 @@ endif ()
123124
124125blt_import_library(NAME blt_cuda
125126 LINK_FLAGS "${CMAKE_CUDA_LINK_FLAGS} "
127+ TREAT_INCLUDES_AS_SYSTEM ON
126128 EXPORTABLE ${BLT_EXPORT_THIRDPARTY}
127129 GLOBAL ${_blt_cuda_is_global} )
128130
Original file line number Diff line number Diff line change 66#------------------------------------------------------------------------------
77# Example host-config file for using PGI and CUDA
88#------------------------------------------------------------------------------
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 "" )
1111
1212set (ENABLE_FORTRAN OFF CACHE BOOL "" )
1313set (ENABLE_MPI OFF CACHE BOOL "" )
1414set (ENABLE_OPENMP OFF CACHE BOOL "" )
1515
1616set (ENABLE_CUDA ON CACHE BOOL "" )
17-
1817set (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