Skip to content
Snippets Groups Projects
Commit bf096d67 authored by Andre Sailer's avatar Andre Sailer Committed by Marko Petric
Browse files

DDTest.EventReader: test HepMC3 reader, make testing depend on cmake options

parent 4dc792ee
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,12 @@ if (DD4HEP_USE_GEANT4)
test_EventReaders
)
add_executable(${TEST_NAME} src/${TEST_NAME}.cc)
if(DD4HEP_USE_HEPMC3)
target_compile_definitions(${TEST_NAME} PRIVATE DD4HEP_USE_HEPMC3)
endif()
if(DD4HEP_USE_LCIO)
target_compile_definitions(${TEST_NAME} PRIVATE DD4HEP_USE_LCIO)
endif()
target_link_libraries(${TEST_NAME} DD4hep::DDCore DD4hep::DDRec DD4hep::DDG4)
target_include_directories(${TEST_NAME} PRIVATE ./include)
install(TARGETS ${TEST_NAME} DESTINATION bin)
......
......@@ -37,11 +37,14 @@ int main(int argc, char** argv ){
std::string inputFileFolder = argv[1];
std::vector<TestTuple> tests;
#ifdef DD4HEP_USE_LCIO
tests.push_back( TestTuple( "LCIOStdHepReader", "bbudsc_3evt.stdhep" ) );
tests.push_back( TestTuple( "LCIOFileReader", "muons.slcio" , /*skipEOF= */ true ) );
#endif
tests.push_back( TestTuple( "Geant4EventReaderHepEvtShort", "Muons10GeV.HEPEvt" ) );
tests.push_back( TestTuple( "Geant4EventReaderHepMC", "g4pythia.hepmc" ) );
#ifdef DD4HEP_USE_HEPMC3
tests.push_back( TestTuple( "HEPMC3FileReader", "g4pythia.hepmc", /*skipEOF= */ true) );
#endif
try{
for(std::vector<TestTuple>::const_iterator it = tests.begin(); it != tests.end(); ++it) {
......
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