eic / EICrecon

EIC Reconstruction - JANA based
https://eic.github.io/EICrecon
GNU Lesser General Public License v3.0
5 stars 26 forks source link

fix: do not warn about `BOOST_ROOT` #1448

Closed wdconinc closed 2 months ago

wdconinc commented 2 months ago

Briefly, what does this PR introduce?

Boost defines the environment variable BOOST_ROOT, which violates the older CMake case-sensitivity syntax for find_package(Boost). Therefore, in CMake 3.27, the policy was changed to also look at uppercase <PACKAGENAME>_ROOT environment variables. In eic-shell, where we have such a newer version, this generates a build warning since the new policy is available but it is not explicitly enabled or disabled.

This PR explicitly enables the policy in those CMake versions that support it. This doesn't affect running in eic-shell other than hiding the warning. Outside eic-shell, for newer CMake versions (>= 3.27), it should only increase the likelihood that the correct Boost version is found without having to hint it on the command line. For older CMake versions (>= 3.24, but < 3.27), there be no effect since unknown policies are ignored by design.

What kind of change does this PR introduce?

Please check if this PR fulfills the following:

Does this PR introduce breaking changes? What changes might users need to make to their code?

No.

Does this PR change default behavior?

No.

github-actions[bot] commented 2 months ago

Capybara summary for PR 1448