Skip to content

Commit

Permalink
Fix linking with vecgeom+cuda when disabling CUDA ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj committed Jan 22, 2024
1 parent ee42919 commit 2d0e10c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/celeritas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,15 @@ if(CELERITAS_USE_VecGeom)
ext/VecgeomParams.surface.cu
)
endif()
endif()

if(CELERITAS_USE_VecGeom AND CELERITAS_USE_CUDA)
# This needs to be public because its might be needed
# to resolve the symbols generate by the `nvcc -dlink` of
# one of the executable.
list(APPEND PUBLIC_DEPS VecGeom::vecgeom)
if(CELERITAS_USE_CUDA)
# This needs to be public because its might be needed
# to resolve the symbols generate by the `nvcc -dlink` of
# one of the executable.
list(APPEND PUBLIC_DEPS VecGeom::vecgeom)
elseif(VecGeom_CUDA_FOUND)
# VecGeom is built with CUDA but Celeritas is not
list(APPEND PRIVATE_DEPS VecGeom::vecgeomcuda)
endif()
endif()

if(CELERITAS_CORE_GEO STREQUAL "VecGeom")
Expand Down

0 comments on commit 2d0e10c

Please sign in to comment.