-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake policy CMP0167 #2088
Comments
Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it. |
I think we should use the config based find_package when the CMake version >= 3.30 and FindBoost when < 3.30. If users can use the newest versions of CMake then they can probably upgrade to the newest versions of boost as well. |
Because boost supports its cmake configuration for version >= 1.70, I will add a config argument in find_package(boost ... ) as soon as the minimum required version of boost changes to >= 1.70. (now, {QL_BOOST_VERSION} would be 1.58.0) |
I was thinking more like the following: if (CMAKE_VERSION GREATER_EQUAL "3.30")
set(QL_BOOST_VERSION 1.70.0)
find_package(Boost ${QL_BOOST_VERSION} CONFIG REQUIRED)
else()
find_package(Boost ${QL_BOOST_VERSION} REQUIRED)
endif() |
I will make a PR for config based find_package(boost... ) asap then. |
Another possibility would be to check if the if (POLICY CMP0167)
set(QL_BOOST_VERSION 1.70.0)
# The FindBoost module is removed in cmake 3.30, finding the upstream BoostConfig.cmake
find_package(Boost ${QL_BOOST_VERSION} CONFIG REQUIRED)
else()
find_package(Boost ${QL_BOOST_VERSION} REQUIRED)
endif() It gives a clearer picture why we distinguish between the two However, be aware that (almost?) all GitHub runners have updated to For the For the |
I will check it. Thank you. |
Actually, it may not be a big deal.
I am currently using CMake >= 3.30 to build the project. It outputs a warning :
In CMake document, (cmake --help-policy CMP0167) it says
I think it is better to suppress such a warning until we require the minimum version of Boost >= 1.70.
The text was updated successfully, but these errors were encountered: