Skip to content
Snippets Groups Projects
Unverified Commit 5827578c authored by thorstenhater's avatar thorstenhater Committed by GitHub
Browse files

Fix linking issues caused by nvcc host compiler. (#1412)

Force nvcc to use the c++ compiler used to compile the c++ code.
parent 659e3c37
No related branches found
No related tags found
No related merge requests found
...@@ -108,6 +108,11 @@ if(ARB_GPU STREQUAL "cuda") ...@@ -108,6 +108,11 @@ if(ARB_GPU STREQUAL "cuda")
set(CMAKE_CUDA_ARCHITECTURES 60 70 80) set(CMAKE_CUDA_ARCHITECTURES 60 70 80)
endif() 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) enable_language(CUDA)
# Despite native CUDA support, the CUDA package is still required to export # Despite native CUDA support, the CUDA package is still required to export
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment