Open PhilipDeegan opened 3 years ago
would a compiler detection PR be considered here?
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
# Set specific options for CUDA if enabled
if (ENABLE_RAJA AND ENABLE_CUDA)
# RAJA requires some experimental features
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -arch ${CUDA_ARCH} --expt-extended-lambda --expt-relaxed-constexpr")
endif ()
# TODO Ensure openmp flags are not enabled twice!
if (ENABLE_OPENMP AND ENABLE_CUDA)
# CMAKE_CUDA_FLAGS does not pass OpenMP_CXX_FLAGS to the host compiler by default
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler ${OpenMP_CXX_FLAGS}")
endif ()
endif()
I've commented out both calls to "set" locally and it all still compiles with -DCMAKE_CUDA_FLAGS="-x cuda"
or perhaps here it should detect clang and add "-x cuda"?
https://github.com/LLNL/SAMRAI/blob/d84e4e7a6d08e065a589708edc4949c97fa1c8ab/cmake/SetupCompilers.cmake#L6
my cmake config is here