From 938bff7279474fa3a43bbc1bcac2f66978362261 Mon Sep 17 00:00:00 2001 From: Kenneth Weiss Date: Mon, 23 Jan 2023 20:59:43 -0800 Subject: [PATCH] Suppress warnings on XL compiler for cub and cuda related to Clang version --- .../thirdparty/SetupAxomThirdParty.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/cmake/thirdparty/SetupAxomThirdParty.cmake b/src/cmake/thirdparty/SetupAxomThirdParty.cmake index 669112725d..d7bb81058b 100644 --- a/src/cmake/thirdparty/SetupAxomThirdParty.cmake +++ b/src/cmake/thirdparty/SetupAxomThirdParty.cmake @@ -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 "")