From b3e12de8858a09604e021c1fe221c881224eb554 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Tue, 12 Sep 2023 22:13:09 +0200 Subject: [PATCH] Make a few cmake improvements (#111) --- CMakeLists.txt | 3 ++- converter/CMakeLists.txt | 2 +- .../k4SimDelphes/examples/options/k4simdelphesalg_pythia.py | 2 +- tests/CMakeLists.txt | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 96ae4354..68555030 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.16) project(k4SimDelphes) @@ -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) diff --git a/converter/CMakeLists.txt b/converter/CMakeLists.txt index 3134eaad..6b74b7a5 100644 --- a/converter/CMakeLists.txt +++ b/converter/CMakeLists.txt @@ -16,7 +16,7 @@ target_link_libraries(DelphesEDM4HepConverter podio::podio ROOT::MathCore ROOT::EG - ROOT::Physics) + ) install(DIRECTORY include/ TYPE INCLUDE) diff --git a/framework/k4SimDelphes/examples/options/k4simdelphesalg_pythia.py b/framework/k4SimDelphes/examples/options/k4simdelphesalg_pythia.py index b703a328..80e75056 100644 --- a/framework/k4SimDelphes/examples/options/k4simdelphesalg_pythia.py +++ b/framework/k4SimDelphes/examples/options/k4simdelphesalg_pythia.py @@ -1,5 +1,5 @@ from Gaudi.Configuration import * -from GaudiKernel import SystemOfUnits as units +import os from Configurables import ApplicationMgr app = ApplicationMgr() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6aec16a2..4b0b149a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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 @@ -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=$:$:$:$:$ENV{LD_LIBRARY_PATH} + LD_LIBRARY_PATH=$:$:$:$:$ENV{LD_LIBRARY_PATH} PATH=$:${DELPHES_BINARY_DIR}:$ENV{PATH} COMPARE=$ )