CMP0093 in findBoost changes how Boost_VERSION is reported#1902
CMP0093 in findBoost changes how Boost_VERSION is reported#1902tspicer01 wants to merge 1 commit intoros:noetic-develfrom
Conversation
|
This would also be fixable by using VERSION_LESS for the comparison, right? Wondering if that way might be more compatible. Oh shoot no, that won't work either because you still need to compare against the other style of version number on the right hand side. Ugh, it looks like this came in as a consequence of CMP0093 in CMake 3.15: https://cmake.org/cmake/help/v3.15/policy/CMP0093.html If A little bit of fun further discovery— CMP0093 only applies to the FindBoost shipped by CMake, which on Focal is in The native Boost version is first in the search path, so setting CMP0093 in either direction does nothing— it doesn't exist in CMake 3.13, and by 3.16, Boost's own module aliases the place where it would have had an effect. My suggestion would be to do something like this: And then do comparisons against |
|
Please see #1903 for an alternative approach since the conditional logic isn't necessary anymore. |
|
Closing in favor of #1903. |
This should fix the Boost version checks for the newer version of Boost.
Newer version (1.71+) report Boost_VERSION in x.y.z format, the older policy reported the Boost_VERSION_MACRO. Set the check to always use the Boost_VERSION_MACRO
See https://cmake.org/cmake/help/v3.15/policy/CMP0093.html?highlight=cmp0093
This should fix issue #1880
Tested using Boost version 1.71 and 1.67 on Ubuntu focal