Skip to content

[CMake] Improve Boost detection when manually setting BOOST_ROOT#13565

Merged
loumalouomega merged 1 commit intomasterfrom
cmake/improve-boost-root-directory-
Jul 7, 2025
Merged

[CMake] Improve Boost detection when manually setting BOOST_ROOT#13565
loumalouomega merged 1 commit intomasterfrom
cmake/improve-boost-root-directory-

Conversation

@loumalouomega
Copy link
Member

📝 Description

Improve Boost detection when manually setting BOOST_ROOT. Without this if later it detects Boost in the system path it will ignore the BOOST_ROOT.

🆕 Changelog

@loumalouomega loumalouomega requested a review from roigcarlo June 26, 2025 09:02
@loumalouomega loumalouomega requested a review from a team as a code owner June 26, 2025 09:02
@loumalouomega loumalouomega added FastPR This Pr is simple and / or has been already tested and the revision should be fast CMake labels Jun 26, 2025
@loumalouomega loumalouomega enabled auto-merge June 26, 2025 09:03
if(DEFINED ENV{BOOST_ROOT})
set(BOOST_ROOT $ENV{BOOST_ROOT})
# Check that boost/any.hpp exists in the BOOST_ROOT include directory
if(EXISTS "${BOOST_ROOT}/boost/any.hpp")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why any in particular? Please don't tell me you're planning on using it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a common file common in all versions (and alphabetically the first)

@loumalouomega loumalouomega merged commit ac27876 into master Jul 7, 2025
21 of 22 checks passed
@loumalouomega loumalouomega deleted the cmake/improve-boost-root-directory- branch July 7, 2025 12:31
@roigcarlo
Copy link
Member

P.s. approved following the discussion in #13597

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

Labels

CMake FastPR This Pr is simple and / or has been already tested and the revision should be fast

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants