From 6c9095ca74a1f8f3fde15900f5dc6c50e96d8718 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 19 Nov 2024 17:50:43 +0100 Subject: [PATCH] Find DD4hep before Gaudi to avoid python version clashes DD4hep has to be found pretty much first for CMake because it is the one that requires an exact version of python. However, if anything else (e.g. Boost via Gaudi) finds another version of python (typically a newer one from the underlying system) then this version will be cached and the check in the DD4hep cmake configuration will fail. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a764efb..6f89e4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,10 +29,10 @@ set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE SET(CMAKE_CXX_FLAGS "-fPIC -Wall -Wextra -Wpedantic ${CMAKE_CXX_FLAGS}") +find_package(DD4hep REQUIRED) find_package(EDM4HEP REQUIRED) find_package(Gaudi REQUIRED) find_package(k4FWCore REQUIRED) -find_package(DD4hep REQUIRED) find_package(ROOT REQUIRED COMPONENTS RIO Tree) find_package(k4SimGeant4 REQUIRED)