From c950b8809a46aed2bd69ccca8a37121afad4ccf7 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 19 Jan 2024 15:29:02 -0600 Subject: [PATCH] fix: only compile edm4eic_merge for podio < 0.17.4 --- utils/CMakeLists.txt | 75 +++++++++++++----------- utils/src/{merge.cpp => event_merge.cpp} | 0 2 files changed, 40 insertions(+), 35 deletions(-) rename utils/src/{merge.cpp => event_merge.cpp} (100%) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 438bfc7..96f8a43 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -36,40 +36,45 @@ install(TARGETS edm4eic_utils if(CLI11_FOUND) - add_executable(edm4eic_merge src/merge.cpp) - - target_compile_features(edm4eic_merge - PUBLIC cxx_auto_type - PUBLIC cxx_trailing_return_types - PUBLIC cxx_std_17 - PRIVATE cxx_variadic_templates - ) - - target_compile_options(edm4eic_merge PRIVATE - -Wno-extra - -Wno-ignored-qualifiers - -Wno-overloaded-virtual - -Wno-shadow - ) - - target_include_directories(edm4eic_merge - PUBLIC $ - PUBLIC $ - PUBLIC $ - ) - - target_link_libraries(edm4eic_merge - PUBLIC edm4eic - PUBLIC EDM4HEP::edm4hep - PUBLIC podio::podio podio::podioRootIO - PUBLIC ROOT::GenVector ROOT::MathCore) - - install(TARGETS edm4eic_merge - EXPORT ${PROJECT_NAME}Targets - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin - INCLUDES DESTINATION include - ) + if(${podio_VERSION} VERSION_LESS 0.17.4) + + # EventStore-based merging + add_executable(edm4eic_event_merge src/event_merge.cpp) + + target_compile_features(edm4eic_event_merge + PUBLIC cxx_auto_type + PUBLIC cxx_trailing_return_types + PUBLIC cxx_std_17 + PRIVATE cxx_variadic_templates + ) + + target_compile_options(edm4eic_event_merge PRIVATE + -Wno-extra + -Wno-ignored-qualifiers + -Wno-overloaded-virtual + -Wno-shadow + ) + + target_include_directories(edm4eic_event_merge + PUBLIC $ + PUBLIC $ + PUBLIC $ + ) + + target_link_libraries(edm4eic_event_merge + PUBLIC edm4eic + PUBLIC EDM4HEP::edm4hep + PUBLIC podio::podio podio::podioRootIO + PUBLIC ROOT::GenVector ROOT::MathCore) + + install(TARGETS edm4eic_event_merge + EXPORT ${PROJECT_NAME}Targets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include + ) + + endif() endif() diff --git a/utils/src/merge.cpp b/utils/src/event_merge.cpp similarity index 100% rename from utils/src/merge.cpp rename to utils/src/event_merge.cpp