diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6d5b67dd207d..8b7b04c14b2f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -308,7 +308,8 @@ endif() # Therefore, we don't use the Kokkos_ENABLE_CUDA_CONSTEXPR option add the flag manually. # Also, not checking for NVIDIA as nvcc_wrapper is identified as GNU so we just make sure # the flag is not added when compiling with Clang for Cuda. -if (Kokkos_ENABLE_CUDA AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +if (Kokkos_ENABLE_CUDA AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" + AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC" ) target_compile_options(parthenon PUBLIC --expt-relaxed-constexpr) endif()