Skip to content
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

Raise minimum required Boost version to 1.55; fix deprecated Boost endians #2801

Merged
merged 3 commits into from
Jan 30, 2019

Conversation

vcarpani
Copy link
Contributor

This PR removes the following warning:
The use of BOOST_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please include <boost/predef/other/endian.h> and use BOOST_ENDIAN_BYTE instead

@SunBlack
Copy link
Contributor

This requires at least Boost 1.55.0. Please set minimum required Boost version to it.

@vcarpani
Copy link
Contributor Author

Is it ok if a check the version with the preprocessor?

#if BOOST_VERSION >= 105500
#include <boost/predef/other/endian.h>
#else
#include <boost/detail/endian.hpp>
#endif

@SunBlack
Copy link
Contributor

SunBlack commented Jan 24, 2019

I believe it is enough to adjust minimum version in CMake. PCL is currently targeting Ubuntu 16.04 as oldest Ubuntu version and this comes with 1.58.0. So forcing 1.55.0 should be ok.

set(Boost_ADDITIONAL_VERSIONS
"1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
"1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
"1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
"1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
"1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47")
# Disable the config mode of find_package(Boost)
set(Boost_NO_BOOST_CMAKE ON)
# Optional boost modules
find_package(Boost 1.40.0 QUIET COMPONENTS serialization mpi)
if(Boost_SERIALIZATION_FOUND)
set(BOOST_SERIALIZATION_FOUND TRUE)
endif()
# Required boost modules
if(WITH_OPENNI2)
set(BOOST_REQUIRED_MODULES filesystem thread date_time iostreams chrono system)
find_package(Boost 1.47.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES})
else()
set(BOOST_REQUIRED_MODULES filesystem thread date_time iostreams system)
find_package(Boost 1.40.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES})
endif()

So adjust Boost_ADDITIONAL_VERSIONS and find_package calls.

@taketwo
Copy link
Member

taketwo commented Jan 24, 2019

👍

@SergioRAgostinho SergioRAgostinho changed the title Fix deprecated boost endians. Bump Boost minimum version to 1.55. Fix deprecated boost endians. Jan 25, 2019
@SergioRAgostinho
Copy link
Member

You'll also need to make changes here

pcl/PCLConfig.cmake.in

Lines 102 to 111 in 66a370b

set(Boost_ADDITIONAL_VERSIONS
"@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@"
"1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
"1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
"1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
"1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
"1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47")
# Disable the config mode of find_package(Boost)
set(Boost_NO_BOOST_CMAKE ON)
find_package(Boost 1.40.0 ${QUIET_} COMPONENTS @PCLCONFIG_AVAILABLE_BOOST_MODULES@)

This section is missing some refactoring.

@vcarpani
Copy link
Contributor Author

vcarpani commented Jan 25, 2019

Thanks, I've updated pcl/PCLConfig.cmake.in and removed some outdated Boost version checks.

@SergioRAgostinho SergioRAgostinho merged commit 6f17488 into PointCloudLibrary:master Jan 30, 2019
@taketwo taketwo changed the title Bump Boost minimum version to 1.55. Fix deprecated boost endians. Raise minimum required Boost version to 1.55; fix deprecated Boost endians Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants