Skip to content
Open
Show file tree
Hide file tree
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
45 changes: 36 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ set(${PackageName}_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${
# Let CMake know where to find FindXXX.cmake files
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

# The Tracking subpackage targets FCCee and pulls in dependencies that are not
# available everywhere (GenFit, MarlinUtil, PandoraSDK, ONNX Runtime, Torch).
# Turn this off to build only the digitizers, e.g. on the Muon Collider stack.
option(K4RECTRACKER_TRACKING "Build the Tracking subpackage" ON)

# The DCH digitisers need Delphes (DCHdigi_v02) and GSL, and build the podio
# datamodel extension used for drift chamber hits.
option(K4RECTRACKER_DCH_DIGITISERS "Build the DCH digitisers" ON)

# dependencies
# For some reason, the find_package with DD4hep must be the first one
find_package(DD4hep REQUIRED COMPONENTS DDRec DDG4 DDParsers)
Expand All @@ -29,13 +38,23 @@ find_package(EDM4HEP REQUIRED)
find_package(k4FWCore 1.3 REQUIRED)
find_package(k4geo REQUIRED)
find_package(Gaudi REQUIRED)
find_package(Delphes REQUIRED)
find_package(GSL REQUIRED)
find_package(PandoraSDK REQUIRED)
find_package(Eigen3 REQUIRED)
# Needed by the DCH digitisers and by Tracking
if(K4RECTRACKER_DCH_DIGITISERS OR K4RECTRACKER_TRACKING)
find_package(Delphes REQUIRED)
endif()

# Only needed by the DCH digitisers
if(K4RECTRACKER_DCH_DIGITISERS)
find_package(GSL REQUIRED)
endif()

find_package(onnxruntime REQUIRED)
find_package(Torch REQUIRED)
# Only needed by Tracking
if(K4RECTRACKER_TRACKING)
find_package(PandoraSDK REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(onnxruntime REQUIRED)
find_package(Torch REQUIRED)
endif()

include(cmake/Key4hepConfig.cmake)

Expand All @@ -53,11 +72,19 @@ function(set_test_env _testname)

endfunction()

add_subdirectory(DCHdigi)
if(K4RECTRACKER_DCH_DIGITISERS)
add_subdirectory(DCHdigi)
else()
message(STATUS "K4RECTRACKER_DCH_DIGITISERS is OFF: not building the DCH digitisers")
endif()
add_subdirectory(ARCdigi)
add_subdirectory(VTXdigi)
add_subdirectory(VTXdigiDetailed)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
add_subdirectory(Tracking)
if(K4RECTRACKER_TRACKING)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
add_subdirectory(Tracking)
else()
message(STATUS "K4RECTRACKER_TRACKING is OFF: not building the Tracking subpackage")
endif()

include(cmake/CreateProjectConfig.cmake)
6 changes: 5 additions & 1 deletion Tracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ gaudi_add_module(${PackageName}
k4FWCore::k4FWCore
k4FWCore::k4Interface
k4geo::detectorCommon
extensionDict
onnxruntime::onnxruntime
torch
DD4hep::DDRec
Expand All @@ -48,6 +47,11 @@ gaudi_add_module(${PackageName}
${DELPHES_LIBRARIES}
)

# The podio datamodel extension is built by DCHdigi
if(TARGET extensionDict)
target_link_libraries(${PackageName} PRIVATE extensionDict)
endif()

if(TARGET PandoraPFA::PandoraSDK)
target_link_libraries(${PackageName} PRIVATE PandoraPFA::PandoraSDK)
endif()
Expand Down
Loading