Skip to content

Commit 677a07d

Browse files
authored
Use HepMC3::HepMC3 imported target instead of old-style variables (#507)
1 parent 8aa0fcd commit 677a07d

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

test/CMakeLists.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,14 @@ IF(TARGET ROOT::ROOTDataFrame)
106106
endif()
107107

108108

109-
find_package(HepMC3)
109+
find_package(HepMC3 3.2.6)
110110
find_package(HepPDT)
111111

112-
if(HepMC3_FOUND AND HepPDT_FOUND )
112+
if(HepMC3_FOUND AND HepPDT_FOUND)
113113
add_executable(edm4hep_testhepmc hepmc/edm4hep_testhepmc.cc)
114-
target_include_directories(edm4hep_testhepmc PUBLIC ${HEPMC3_INCLUDE_DIR} ${HEPPDT_INCLUDE_DIR} )
115-
target_link_libraries(edm4hep_testhepmc edm4hep podio::podioRootIO ${HEPPDT_LIBRARIES} ${HEPMC3_LIBRARIES})
114+
target_include_directories(edm4hep_testhepmc PUBLIC ${HEPPDT_INCLUDE_DIR})
115+
target_link_libraries(edm4hep_testhepmc edm4hep podio::podioRootIO ${HEPPDT_LIBRARIES} HepMC3::HepMC3)
116116
add_edm4hep_test(edm4hep_testhepmc COMMAND edm4hep_testhepmc)
117-
set_property(TEST edm4hep_testhepmc APPEND PROPERTY ENVIRONMENT
118-
ROOT_INCLUDE_PATH=${HEPMC3_INCLUDE_DIR}:$ENV{ROOT_INCLUDE_PATH}
119-
)
120117
endif()
121118

122119
add_edm4hep_test(py_test_module COMMAND python ${CMAKE_CURRENT_LIST_DIR}/test_module.py)

0 commit comments

Comments
 (0)