Boost logo

Boost :

From: Dimitri John Ledkov (xnox_at_[hidden])
Date: 2020-02-05 12:47:05


I have the following CMakeLists.txt:
project(Boost CXX)
cmake_minimum_required(VERSION 3.0)
FIND_PACKAGE(Boost COMPONENTS filesystem REQUIRED)
message( ${Boost_VERSION} )

In Ubuntu 18.04 LTS (Bionic) this produces:
cmake ../
-- The CXX compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- filesystem
-- system
106501
-- Configuring done
-- Generating done
-- Build files have been written to: /root/foo/build

As in Boost_VERSION is set to 106501

In Ubuntu 20.04 LTS (Focal, devel release) which uses boost 1.71 with
boost cmake files:
-- The CXX compiler identification is GNU 9.2.1
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost:
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found
version "1.71.0") found components: filesystem
1.71.0
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/xnox/canonical/boost/debian/tests/srcs/filesystem/foo

As in Boost_VERSION is set to 1.71.0

Now, lot of projects have Boost version comparison already and 1.71.0
is less than 106501. This creates problems for example when trying to
detect and use new-style pythonXY components, filesystem v3 api, etc.

For example I found in Ubuntu packages stanzas like:
if (${Boost_VERSION} LESS 104400)

Can we please fix Boost_VERSION in the new-style cmake to be
compatible / same / similar / higher than the old Boost_VERSION
string?

-- 
Regards,
Dimitri.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk