Skip to content

refactor(Calorimeter): obtain tomlplusplus via find_package#23

Open
olantwin wants to merge 1 commit into
mainfrom
refactor/calorimeter-tomlplusplus-find-package
Open

refactor(Calorimeter): obtain tomlplusplus via find_package#23
olantwin wants to merge 1 commit into
mainfrom
refactor/calorimeter-tomlplusplus-find-package

Conversation

@olantwin
Copy link
Copy Markdown
Contributor

@olantwin olantwin commented Jun 4, 2026

Summary

  • Replace the `FetchContent_Declare(tomlplusplus)` block in `subsystems/Calorimeter/CMakeLists.txt` with a single `find_package(tomlplusplus REQUIRED)` call.
  • Aligns with how the repo treats its other production dependencies (`GeoModelCore`, `GeoModelIO`, `GeoModelTools` — all `find_package(... REQUIRED)` in the top-level `CMakeLists.txt`).
  • The `$<BUILD_INTERFACE:tomlplusplus::tomlplusplus>` wrapping in `target_link_libraries` is preserved — that's an install-time export concern and is independent of how the package is resolved.

Motivation

Surfaced while writing a `shipgeometry` recipe for `ship-conda-recipes`. `FetchContent` requires network at configure time, which we'd rather avoid in packaged builds. `tomlplusplus` is available on conda-forge (and as e.g. `libtomlplusplus-dev` on Debian/Ubuntu), so requiring it as a system dep is a small environment-setup bump rather than real friction.

Behaviour change

Builds without `tomlplusplus` installed will now fail at configure time with a clear CMake error pointing at the missing package, rather than silently downloading from GitHub. For contributors, `pixi install` / `apt install libtomlplusplus-dev` / `brew install tomlplusplus` covers it.

Test plan

  • CI (`build-test.yml`) stays green — the LCG / CVMFS environment should already provide `tomlplusplus`.
  • Existing Catch2 tests in `subsystems/Calorimeter/test_calorimeter.cpp` continue to pass (they exercise CalorimeterConfig's toml++ parsing).

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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Warning

Review limit reached

@olantwin, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 8 minutes and 37 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 609aa986-2356-47e4-9882-18589e6ce885

📥 Commits

Reviewing files that changed from the base of the PR and between a4df127 and 140d6d0.

📒 Files selected for processing (1)
  • subsystems/Calorimeter/CMakeLists.txt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/calorimeter-tomlplusplus-find-package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant