Skip to content

Commit

Permalink
GPU CMake: Workaround for CMake adding old cmake library paths implic…
Browse files Browse the repository at this point in the history
…itly if we request an old GCC for CUDA
  • Loading branch information
davidrohr committed Aug 5, 2024
1 parent 2cf3b47 commit bf35985
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dependencies/FindO2GPU.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})")
Expand Down

0 comments on commit bf35985

Please sign in to comment.