Skip to content

Commit

Permalink
fix: only compile edm4eic_merge for podio < 0.17.4 (#64)
Browse files Browse the repository at this point in the history
### Briefly, what does this PR introduce?
With podio 0.17.4, we can't compile emd4eic_merge anymore since it is
reliant on podio/EventStore.h. We have been ignoring the deprecation
warnings about this for half a year now...

This PR makes the compilation of edm4eic_merge conditional on being
before that version. It renames the source and executable to
event_merge.cpp and edm4eic_event_merge to make clear this isn't working
for frames. Code is not removed since an adventurous soul may port this
to frames so we can do background mixing.

### What kind of change does this PR introduce?
- [x] Bug fix (issue: edm4eic doens't compile with podio 0.17.4)
- [ ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
Yes, edm4eic_merge is renamed, and will not be installed when newer
versions of podio are used.
  • Loading branch information
wdconinc authored Jan 21, 2024
1 parent 23e41fc commit 773bf26
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 35 deletions.
75 changes: 40 additions & 35 deletions utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<INSTALL_INTERFACE:include>
)

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 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<INSTALL_INTERFACE:include>
)

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()
File renamed without changes.

0 comments on commit 773bf26

Please sign in to comment.