From a5cdc28b5a7b266a04797dc179e12030553af14c Mon Sep 17 00:00:00 2001 From: tmadlener Date: Tue, 3 Sep 2024 11:07:52 +0200 Subject: [PATCH] Make sure to not continue without any podio --- CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce736d80..181bdd7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,11 +22,18 @@ project(k4FWCore) find_package(ROOT COMPONENTS RIO Tree REQUIRED) find_package(Gaudi REQUIRED) - find_package(podio 0.16.3) # this will not find 1.0 and newer - if(NOT podio_FOUND) - # we try to find a newer version now - find_package(podio 1.0 REQUIRED) - endif() +find_package(podio 0.16.3 QUIET) # this will not find 1.0 and newer +if(NOT podio_FOUND) + # we try to find a newer version now + find_package(podio 1.0 REQUIRED) +else() + message(WARNING "Found podio < 1.0. This should still work, but consider moving to a newer version") +endif() + +if(NOT podio_FOUND) + message(FATAL_ERROR "Could not find a suitable version of podio") +endif() + find_package(EDM4HEP REQUIRED) include(cmake/Key4hepConfig.cmake)