Skip to content

Commit

Permalink
Fixup target names following rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
drbenmorgan committed Mar 18, 2024
1 parent 25f38ab commit f08d53a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 41 deletions.
33 changes: 3 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,13 @@ endif()
#----------------------------------------------------------------------------#
# Build Targets
#----------------------------------------------------------------------------#
set(ADEPT_SRCS
src/AdePTTransport.cpp
src/AdePTConfigurationMessenger.cc
)

set(ADEPT_CUDA_SRCS
src/AdePTTransport.cu
src/HostScoring.cu
)

set(ADEPT_G4_INTEGRATION_SRCS
src/AdePTTrackingManager.cc
src/AdePTTrackingManager.cu
src/AdePTPhysics.cc
src/HepEMPhysics.cc
src/AdePTGeant4Integration.cpp
src/adept_g4_dummy.cu
src/AdePTConfigurationMessenger.cc
)

# - Build RDC/Non-RDC libraries
Expand All @@ -169,23 +160,6 @@ cuda_rdc_target_include_directories(CopCore
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}>
)

# - AdePT
cuda_rdc_add_library(AdePT SHARED ${ADEPT_SRCS} ${ADEPT_CUDA_SRCS})
cuda_rdc_add_library(AdePT::AdePT ALIAS AdePT)
cuda_rdc_target_include_directories(AdePT
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
cuda_rdc_target_link_libraries(AdePT
PUBLIC
CopCore
VecGeom::vecgeom
VecGeom::vgdml
G4HepEm::g4HepEm
G4HepEm::g4HepEmData
)

# - AdePT_G4_integration
cuda_rdc_add_library(AdePT_G4_integration SHARED ${ADEPT_G4_INTEGRATION_SRCS})
cuda_rdc_add_library(AdePT::AdePT_G4_integration ALIAS AdePT_G4_integration)
Expand All @@ -196,7 +170,6 @@ cuda_rdc_target_include_directories(AdePT_G4_integration
)
cuda_rdc_target_link_libraries(AdePT_G4_integration
PUBLIC
AdePT
CopCore
VecGeom::vecgeom
VecGeom::vecgeomcuda_static
Expand Down Expand Up @@ -231,7 +204,7 @@ configure_package_config_file(cmake/${PROJECT_NAME}Config.cmake.in
)

#Install the libraries
cuda_rdc_install(TARGETS CopCore AdePT AdePT_G4_integration
cuda_rdc_install(TARGETS CopCore AdePT_G4_integration
EXPORT ${PROJECT_NAME}Targets
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ functions to ensure the correct device linking. For an executable target:
include(CudaRdcUtils)
add_executable(MyExe MyExe.cc)
cuda_rdc_target_link_libraries(MyExe AdePT::AdePT)
cuda_rdc_target_link_libraries(MyExe AdePT::AdePT_G4_integration)
```

and for a library plus executable:
Expand All @@ -132,7 +132,7 @@ and for a library plus executable:
include(CudaRdcUtils)
cuda_rdc_add_library(MyLib ...)
cuda_rdc_target_link_libraries(MyLib AdePT::AdePT)
cuda_rdc_target_link_libraries(MyLib AdePT::AdePT_G4_integration)
add_executable(MyExe MyExe.cc)
cuda_rdc_target_link_libraries(MyExe MyLib)
Expand Down
3 changes: 1 addition & 2 deletions cmake/AdePTConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ list(PREPEND CMAKE_MODULE_PATH "${AdePT_CMAKE_DIR}")

set(AdePT_LIBRARIES
AdePT::CopCore
AdePT::AdePT_G4_integration
AdePT::AdePT)
AdePT::AdePT_G4_integration)

# Find required dependencies
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags")
Expand Down
1 change: 0 additions & 1 deletion examples/Example1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ target_include_directories(example1
cuda_rdc_target_link_libraries(example1
PRIVATE
AdePT_G4_integration
AdePT
${HEPMC3_LIBRARIES}
${HEPMC3_FIO_LIBRARIES}
)
Expand Down
1 change: 0 additions & 1 deletion examples/IntegrationBenchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ target_include_directories(integrationBenchmark
cuda_rdc_target_link_libraries(integrationBenchmark
PRIVATE
AdePT_G4_integration
AdePT
${HEPMC3_LIBRARIES}
${HEPMC3_FIO_LIBRARIES}
)
Expand Down
4 changes: 0 additions & 4 deletions src/adept_g4_dummy.cu

This file was deleted.

2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ macro(build_tests TESTS)
get_filename_component(TARGET_NAME ${TEST} NAME_WE)
add_executable(${TARGET_NAME} ${TEST})
# NB: We do not use PRIVATE for executables due to an apparent limitation in CudaRDCUtils
cuda_rdc_target_link_libraries(${TARGET_NAME} AdePT_G4_integration AdePT)
cuda_rdc_target_link_libraries(${TARGET_NAME} AdePT_G4_integration)
endforeach()
endmacro()

Expand Down

0 comments on commit f08d53a

Please sign in to comment.