Skip to content

Commit

Permalink
Attempt to fix missing library links when using static libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj committed Jan 22, 2024
1 parent 2d0e10c commit 00bb18a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,13 @@ elseif(CELERITAS_USE_HIP)
set(CELERITAS_HAVE_ROCTX ON)
target_link_libraries(celeritas_device_toolkit INTERFACE ${ROCTX_LIBRARY})
endif()
# TODO: downstream libs don't link against correct HIP dependencies when using
# static libraries
if(NOT BUILD_SHARED_LIBS)
# Downstream libs don't link against correct HIP dependencies when using
# static libraries
target_link_libraries(celeritas_device_toolkit
INTERFACE "$<INSTALL_INTERFACE:${CMAKE_HIP_IMPLICIT_LINK_LIBRARIES}>"
)
endif()
endif()

install(TARGETS celeritas_device_toolkit
Expand Down

0 comments on commit 00bb18a

Please sign in to comment.