From 140d6d0227785a6291fa32d96ba70288c4d0f602 Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Thu, 4 Jun 2026 15:44:11 +0200 Subject: [PATCH] refactor(Calorimeter): obtain tomlplusplus via find_package Replace the FetchContent_Declare(tomlplusplus) block with a single find_package(tomlplusplus REQUIRED). This avoids fetching toml++ from GitHub at configure time and aligns with how the repo treats its other production dependencies (GeoModelCore, GeoModelIO, GeoModelTools). tomlplusplus is available on conda-forge and in most distros, so this is a small environment-setup requirement bump rather than a real friction increase. Builds without the package installed will fail at configure time with a clear CMake error pointing at the missing package. --- subsystems/Calorimeter/CMakeLists.txt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/subsystems/Calorimeter/CMakeLists.txt b/subsystems/Calorimeter/CMakeLists.txt index c33a847..2cc4f17 100644 --- a/subsystems/Calorimeter/CMakeLists.txt +++ b/subsystems/Calorimeter/CMakeLists.txt @@ -1,17 +1,9 @@ # SPDX-License-Identifier: LGPL-3.0-or-later # Copyright (C) CERN for the benefit of the SHiP Collaboration -# ── toml++ (header-only TOML parser) ────────────────────────────────────────── -# Pulled in via FetchContent so we don't vendor a 7000-line single header. -# Pinned to a release tag so subsequent fetches are reproducible. -include(FetchContent) -FetchContent_Declare( - tomlplusplus - GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git - GIT_TAG v3.4.0 - GIT_SHALLOW TRUE -) -FetchContent_MakeAvailable(tomlplusplus) +# toml++ — header-only TOML parser used by CalorimeterConfig's parsing +# internals. Available on conda-forge (`tomlplusplus`) and in most distros. +find_package(tomlplusplus REQUIRED) # Stage calo.toml into the build directory so tests running from there find it. configure_file(