diff --git a/CMakeLists.txt b/CMakeLists.txt index 65c3fe93c7ecb285227e30b2c9991802932c46f7..a71711d952a7708e796bc249bdf1ad0f50a39216 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,11 @@ if(ARB_GPU STREQUAL "cuda") set(CMAKE_CUDA_ARCHITECTURES 60 70 80) endif() + # This fixes nvcc picking up a wrong host compiler for linking, causing issues + # with outdated libraries, eg libstdc++ and std::filesystem. Must happend before + # all calls to enable_language(CUDA) + set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER}) + enable_language(CUDA) # Despite native CUDA support, the CUDA package is still required to export