Skip to content

Commit

Permalink
Make a few cmake improvements (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Sep 12, 2023
1 parent 1882557 commit b3e12de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.16)

project(k4SimDelphes)

Expand Down Expand Up @@ -78,6 +78,7 @@ endif()
#--- Non-optional Dependencies ------------------------------------------------
find_package(Delphes REQUIRED)
find_package(EDM4HEP REQUIRED)
find_package(ROOT REQUIRED)

#--- optional dependencies
if(BUILD_PYTHIA_READER OR BUILD_EVTGEN_READER)
Expand Down
2 changes: 1 addition & 1 deletion converter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ target_link_libraries(DelphesEDM4HepConverter
podio::podio
ROOT::MathCore
ROOT::EG
ROOT::Physics)
)

install(DIRECTORY include/
TYPE INCLUDE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from Gaudi.Configuration import *
from GaudiKernel import SystemOfUnits as units
import os

from Configurables import ApplicationMgr
app = ApplicationMgr()
Expand Down
4 changes: 2 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ target_include_directories(compare_delphes_converter_outputs
${PROJECT_SOURCE_DIR}/converter/src #for delphesHelpers
${PROJECT_SOURCE_DIR}/converter/include
)
target_link_libraries(compare_delphes_converter_outputs PRIVATE EDM4HEP::edm4hep ${DELPHES_LIBRARY} podio::podioRootIO ROOT::Physics)
target_link_libraries(compare_delphes_converter_outputs PRIVATE EDM4HEP::edm4hep EDM4HEP::kinematics ${DELPHES_LIBRARY} podio::podioRootIO ROOT::Core ROOT::MathCore ROOT::Physics)

function(ADD_COMPARISON_TEST name converter)
# Check if we have the standalone Delphes application available for the
Expand All @@ -29,7 +29,7 @@ function(ADD_COMPARISON_TEST name converter)
COMMAND bash -x ${PROJECT_SOURCE_DIR}/tests/testDriver.sh ${converter} ${ARGN})

set_property(TEST ${name} PROPERTY ENVIRONMENT
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:DelphesEDM4HepConverter>:$<TARGET_FILE_DIR:EDM4HEP::edm4hepDict>:$<TARGET_FILE_DIR:podio::podioDict>:$<TARGET_FILE_DIR:ROOT::RIO>:$ENV{LD_LIBRARY_PATH}
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:DelphesEDM4HepConverter>:$<TARGET_FILE_DIR:EDM4HEP::edm4hep>:$<TARGET_FILE_DIR:podio::podio>:$<TARGET_FILE_DIR:ROOT::RIO>:$ENV{LD_LIBRARY_PATH}
PATH=$<TARGET_FILE_DIR:${converter}>:${DELPHES_BINARY_DIR}:$ENV{PATH}
COMPARE=$<TARGET_FILE:compare_delphes_converter_outputs>
)
Expand Down

0 comments on commit b3e12de

Please sign in to comment.