Skip to content

Commit

Permalink
Suppress warnings on XL compiler for cub and cuda related to Clang ve…
Browse files Browse the repository at this point in the history
…rsion
  • Loading branch information
kennyweiss committed Jan 24, 2023
1 parent 332f3d7 commit 938bff7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/cmake/thirdparty/SetupAxomThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,25 @@ if (RAJA_DIR)
message(STATUS "RAJA loaded: ${RAJA_DIR}")
set(RAJA_FOUND TRUE CACHE BOOL "")
endif()

# Suppress warnings from cub and cuda related to the (low) version
# of clang that XL compiler pretends to be.
if(C_COMPILER_FAMILY_IS_XL)
if(TARGET RAJA::cub)
blt_add_target_definitions(
TO RAJA::cub
SCOPE INTERFACE
TARGET_DEFINITIONS CUB_IGNORE_DEPRECATED_CPP_DIALECT)
endif()

if(TARGET cuda)
blt_add_target_definitions(
TO cuda
SCOPE INTERFACE
TARGET_DEFINITIONS THRUST_IGNORE_DEPRECATED_CPP_DIALECT)
endif()
endif()

else()
message(STATUS "RAJA support is OFF" )
set(RAJA_FOUND FALSE CACHE BOOL "")
Expand Down

0 comments on commit 938bff7

Please sign in to comment.