diff --git a/dependencies/FindO2GPU.cmake b/dependencies/FindO2GPU.cmake index 9e5bc6d3d06a9..af7da049e0ff6 100644 --- a/dependencies/FindO2GPU.cmake +++ b/dependencies/FindO2GPU.cmake @@ -130,6 +130,9 @@ if(ENABLE_CUDA) if(CMAKE_CXX_FLAGS MATCHES "(^| )-Werror( |$)") set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Werror=cross-execution-space-call") endif() + if(GPUCA_CUDA_GCCBIN) + list(FILTER CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES EXCLUDE REGEX "^/usr/lib.*/gcc/") # Workaround, since CMake adds old GCC lib paths implicitly if we request that gcc for CUDA + endif() set(CUDA_ENABLED ON) message(STATUS "CUDA found (Version ${CMAKE_CUDA_COMPILER_VERSION})")