Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linking errors with CUDA+VecGeom caused by #847 #856

Merged
merged 2 commits into from
Jul 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmake/CeleritasLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ function(celeritas_rdc_add_library target)
add_library(Celeritas::${target}_final ALIAS ${target}_final)
set_target_properties(${target}_final PROPERTIES
${_common_props}
LINK_DEPENDS $<TARGET_FILE:${target}${_staticsuf}>
CELERITAS_CUDA_LIBRARY_TYPE Final
CUDA_RESOLVE_DEVICE_SYMBOLS ON
EXPORT_PROPERTIES "CELERITAS_CUDA_LIBRARY_TYPE;CELERITAS_CUDA_FINAL_LIBRARY;CELERITAS_CUDA_MIDDLE_LIBRARY;CELERITAS_CUDA_STATIC_LIBRARY"
Expand Down Expand Up @@ -758,6 +759,9 @@ function(celeritas_target_link_libraries target)
PRIVATE
$<DEVICE_LINK:$<TARGET_FILE:${_libstatic}>>
)
set_property(TARGET ${_target_final} APPEND
PROPERTY LINK_DEPENDS $<TARGET_FILE:${_libstatic}>
)

# Also pass on the the options and definitions.
celeritas_transfer_setting(${_libstatic} ${_target_final} COMPILE_OPTIONS)
Expand Down