From ff4d002822cabd049494e6592876b516fa7a4ab0 Mon Sep 17 00:00:00 2001 From: P-A Loizeau <p.-a.loizeau@gsi.de> Date: Thu, 13 Mar 2025 13:20:26 +0100 Subject: [PATCH] Fixes to dependencies on CbmYamlInterface and related include folders definition - Declare CbmYamlInterface as INTERFACE dependency where needed (instead of PRIVATE/PUBLIC if already in) - Add include folders for algo/yaml and algo/qa where needed - Replace all occurences of CBMROOT_SOURCE_DIR in include folders definition with CMAKE_SOURCE_DIR --- algo/CMakeLists.txt | 8 ++++---- core/qa/CMakeLists.txt | 2 ++ reco/KF/KFParticleInterface.cmake | 8 +++++--- reco/L1/CMakeLists.txt | 5 +++++ reco/detectors/tof/CMakeLists.txt | 2 +- reco/tasks/CMakeLists.txt | 4 +++- reco/tasks/CbmTaskDigiEventQa.cxx | 2 +- sim/transport/steer/CMakeLists.txt | 2 +- 8 files changed, 22 insertions(+), 11 deletions(-) diff --git a/algo/CMakeLists.txt b/algo/CMakeLists.txt index 89640eefdc..677b09d719 100644 --- a/algo/CMakeLists.txt +++ b/algo/CMakeLists.txt @@ -217,7 +217,6 @@ target_include_directories(Algo target_link_libraries(Algo PUBLIC OnlineData - CbmYamlInterface KfCore CaCore ROOT::GenVector @@ -234,7 +233,8 @@ target_link_libraries(Algo external::fles_monitoring cppzmq poolstl - PRIVATE CbmKFParticleOnlineInterface + PRIVATE CbmKFParticleOnlineInterface + INTERFACE CbmYamlInterface ) target_compile_definitions(Algo PUBLIC NO_ROOT) xpu_attach(Algo ${DEVICE_SRCS}) @@ -294,7 +294,6 @@ if (NOT CBM_ONLINE_STANDALONE) target_link_libraries(AlgoOffline PUBLIC CbmData - CbmYamlInterface KfCoreOffline CaCoreOffline ROOT::GenVector @@ -311,7 +310,8 @@ if (NOT CBM_ONLINE_STANDALONE) external::fles_monitoring cppzmq poolstl - PRIVATE CbmKFParticleOnlineInterface + PRIVATE CbmKFParticleOnlineInterface + INTERFACE CbmYamlInterface ) xpu_attach(AlgoOffline ${DEVICE_SRCS}) diff --git a/core/qa/CMakeLists.txt b/core/qa/CMakeLists.txt index f115de3c75..9b022d7bb8 100644 --- a/core/qa/CMakeLists.txt +++ b/core/qa/CMakeLists.txt @@ -2,6 +2,7 @@ set(INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/checker ${CMAKE_CURRENT_SOURCE_DIR}/report ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/algo/base # For "algo/base/yaml/*.h" included as relative "yaml/?????.h" to fit install tree ) set(SRCS @@ -63,6 +64,7 @@ set(PRIVATE_DEPENDENCIES set(INTERFACE_DEPENDENCIES ROOT::Graf + CbmYamlInterface ) generate_cbm_library() diff --git a/reco/KF/KFParticleInterface.cmake b/reco/KF/KFParticleInterface.cmake index 7f594ec0a9..a09ae917a1 100644 --- a/reco/KF/KFParticleInterface.cmake +++ b/reco/KF/KFParticleInterface.cmake @@ -6,6 +6,7 @@ set(INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Interface ${CMAKE_CURRENT_SOURCE_DIR}/KFQA + ${CMAKE_SOURCE_DIR}/algo/base # For "algo/base/yaml/*.h" included as relative "yaml/?????.h" to fit install tree ) set(SRCS @@ -43,11 +44,11 @@ EndIf() IF (SSE_FOUND) Message(STATUS "KFParticleInterface will be compiled with SSE support") ADD_DEFINITIONS(-DHAVE_SSE) - SET_SOURCE_FILES_PROPERTIES(${SRCS} PROPERTIES COMPILE_FLAGS + SET_SOURCE_FILES_PROPERTIES(${SRCS} PROPERTIES COMPILE_FLAGS "-msse -O3") ELSE (SSE_FOUND) MESSAGE(STATUS "KFParticleInterface will be compiled without SSE support") - SET_SOURCE_FILES_PROPERTIES(${SRCS} PROPERTIES COMPILE_FLAGS + SET_SOURCE_FILES_PROPERTIES(${SRCS} PROPERTIES COMPILE_FLAGS "-O3") ENDIF (SSE_FOUND) @@ -57,7 +58,7 @@ set(LINKDEF ${LIBRARY_NAME}LinkDef.h) set(PUBLIC_DEPENDENCIES CbmData KF - FairRoot::Base + FairRoot::Base ROOT::Core ROOT::Hist ) @@ -76,6 +77,7 @@ set(PRIVATE_DEPENDENCIES set(INTERFACE_DEPENDENCIES CbmRecoBase + CbmYamlInterface ) Set(DEFINITIONS -DDO_TPCCATRACKER_EFF_PERFORMANCE -DNonhomogeneousField -DCBM -DUSE_TIMERS) diff --git a/reco/L1/CMakeLists.txt b/reco/L1/CMakeLists.txt index 6f6b1a79af..4e0573c8d4 100644 --- a/reco/L1/CMakeLists.txt +++ b/reco/L1/CMakeLists.txt @@ -16,6 +16,7 @@ set(INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/L1Algo/utils ${CMAKE_CURRENT_SOURCE_DIR}/catools ${CMAKE_CURRENT_SOURCE_DIR}/utils + ${CMAKE_SOURCE_DIR}/algo/base # For "algo/base/yaml/*.h" included as relative "yaml/?????.h" to fit install tree ) @@ -174,6 +175,10 @@ set(PRIVATE_DEPENDENCIES ROOT::RIO ) +set(INTERFACE_DEPENDENCIES + CbmYamlInterface +) + generate_cbm_library() add_dependencies(G__L1 KFPARTICLE) diff --git a/reco/detectors/tof/CMakeLists.txt b/reco/detectors/tof/CMakeLists.txt index 02561f15a6..42b61bf92c 100644 --- a/reco/detectors/tof/CMakeLists.txt +++ b/reco/detectors/tof/CMakeLists.txt @@ -1,7 +1,7 @@ set(INCLUDE_DIRECTORIES - ${CBMROOT_SOURCE_DIR}/fles/flestools ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/unpack + ${CMAKE_SOURCE_DIR}/fles/flestools ) diff --git a/reco/tasks/CMakeLists.txt b/reco/tasks/CMakeLists.txt index 991210bd39..87daab1083 100644 --- a/reco/tasks/CMakeLists.txt +++ b/reco/tasks/CMakeLists.txt @@ -3,7 +3,8 @@ set(INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} - ${CBMROOT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/algo # For "algo/qa/*.h" included as relative "qa/?????.h" to fit install tree + ${CMAKE_SOURCE_DIR}/algo/base # For "algo/base/yaml/*.h" included as relative "yaml/?????.h" to fit install tree ) set(SRCS @@ -58,6 +59,7 @@ set(PRIVATE_DEPENDENCIES set(INTERFACE_DEPENDENCIES external::fles_ipc + CbmYamlInterface ) generate_cbm_library() diff --git a/reco/tasks/CbmTaskDigiEventQa.cxx b/reco/tasks/CbmTaskDigiEventQa.cxx index 00c542cf7e..b07b9b49fc 100644 --- a/reco/tasks/CbmTaskDigiEventQa.cxx +++ b/reco/tasks/CbmTaskDigiEventQa.cxx @@ -5,7 +5,7 @@ #include "CbmTaskDigiEventQa.h" #include "CbmReco.h" // for CbmRecoConfig -#include "algo/qa/Histo1D.h" +#include "qa/Histo1D.h" #include <FairRunOnline.h> #include <Logger.h> diff --git a/sim/transport/steer/CMakeLists.txt b/sim/transport/steer/CMakeLists.txt index 09ea11a22f..79ea0c3f0a 100644 --- a/sim/transport/steer/CMakeLists.txt +++ b/sim/transport/steer/CMakeLists.txt @@ -1,6 +1,6 @@ set(INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} - ${CBMROOT_SOURCE_DIR}/core/config + ${CMAKE_SOURCE_DIR}/core/config ) set(SRCS -- GitLab