Skip to content
Snippets Groups Projects
Commit fbb5e7f7 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin Committed by Andre Sailer
Browse files

Decompression support was only added in HepMC3 v3.2.5

parent c8b0fbc1
No related branches found
No related tags found
No related merge requests found
...@@ -155,14 +155,16 @@ if(DD4HEP_USE_EDM4HEP) ...@@ -155,14 +155,16 @@ if(DD4HEP_USE_EDM4HEP)
# DD4HEP_SETUP_EDM4HEP_TARGETS() # DD4HEP_SETUP_EDM4HEP_TARGETS()
endif() endif()
IF(DD4HEP_USE_HEPMC3) if(DD4HEP_USE_HEPMC3)
find_package(HepMC3 REQUIRED) find_package(HepMC3 REQUIRED)
# Optional dependencies for compressed input support # Optional dependencies for compressed input support
find_package(ZLIB) if(${HEPMC3_VERSION} VERSION_GREATER_EQUAL "3.02.05")
find_package(LibLZMA) find_package(ZLIB)
find_package(BZip2) find_package(LibLZMA)
ENDIF() find_package(BZip2)
endif()
endif()
if(DD4HEP_USE_TBB) if(DD4HEP_USE_TBB)
find_package(TBB REQUIRED CONFIG) find_package(TBB REQUIRED CONFIG)
......
...@@ -60,29 +60,31 @@ if (DD4HEP_USE_GEANT4) ...@@ -60,29 +60,31 @@ if (DD4HEP_USE_GEANT4)
if(DD4HEP_USE_HEPMC3) if(DD4HEP_USE_HEPMC3)
set(TEST_HEPMC3_EXTENSIONS) set(TEST_HEPMC3_EXTENSIONS)
if(ZLIB_FOUND) if(${HEPMC3_VERSION} VERSION_GREATER_EQUAL "3.02.05")
file(ARCHIVE_CREATE if(ZLIB_FOUND)
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Pythia_output.hepmc.gz file(ARCHIVE_CREATE
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/inputFiles/Pythia_output.hepmc OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Pythia_output.hepmc.gz
FORMAT raw PATHS ${CMAKE_CURRENT_SOURCE_DIR}/inputFiles/Pythia_output.hepmc
COMPRESSION GZip) FORMAT raw
list(APPEND TEST_HEPMC3_EXTENSIONS .gz) COMPRESSION GZip)
endif() list(APPEND TEST_HEPMC3_EXTENSIONS .gz)
if(LIBLZMA_FOUND) endif()
file(ARCHIVE_CREATE if(LIBLZMA_FOUND)
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Pythia_output.hepmc.xz file(ARCHIVE_CREATE
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/inputFiles/Pythia_output.hepmc OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Pythia_output.hepmc.xz
FORMAT raw PATHS ${CMAKE_CURRENT_SOURCE_DIR}/inputFiles/Pythia_output.hepmc
COMPRESSION XZ) FORMAT raw
list(APPEND TEST_HEPMC3_EXTENSIONS .xz) COMPRESSION XZ)
endif() list(APPEND TEST_HEPMC3_EXTENSIONS .xz)
if(BZIP2_FOUND) endif()
file(ARCHIVE_CREATE if(BZIP2_FOUND)
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Pythia_output.hepmc.bz2 file(ARCHIVE_CREATE
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/inputFiles/Pythia_output.hepmc OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Pythia_output.hepmc.bz2
FORMAT raw PATHS ${CMAKE_CURRENT_SOURCE_DIR}/inputFiles/Pythia_output.hepmc
COMPRESSION BZip2) FORMAT raw
list(APPEND TEST_HEPMC3_EXTENSIONS .bz2) COMPRESSION BZip2)
list(APPEND TEST_HEPMC3_EXTENSIONS .bz2)
endif()
endif() endif()
foreach(TEST_HEPMC3_EXTENSION "" ${TEST_HEPMC3_EXTENSIONS}) foreach(TEST_HEPMC3_EXTENSION "" ${TEST_HEPMC3_EXTENSIONS})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment