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

[9.3] Boost 1.78 #13180

Merged
merged 5 commits into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions cmake/configure/configure_2_boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,26 @@ MACRO(FEATURE_BOOST_CONFIGURE_COMMON)
ENDIF()

ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-unused-local-typedefs")

# At least BOOST 1.74 has the problem that some of the BOOST headers
# include other BOOST headers that are deprecated, and this then leads to
# warnings. That's rather annoying.

# The configure function is called only once. In case an externally provided
# boost library is detected, BOOST_INCLUDE_DIRS contains the include paths to
# be used and BOOST_BUNDLED_INCLUDE_DIRS is empty. For the bundled library, it
# is the other way around.
LIST(APPEND CMAKE_REQUIRED_INCLUDES ${BOOST_INCLUDE_DIRS} ${BOOST_BUNDLED_INCLUDE_DIRS})

CHECK_CXX_COMPILER_BUG(
"
#define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED
#define BOOST_HEADER_DEPRECATED(a) _Pragma(\"GCC error \\\"stop compilation\\\"\");
#include <boost/geometry/index/rtree.hpp>
int main() { return 0; }
"
DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS)
RESET_CMAKE_REQUIRED()
ENDMACRO()


Expand Down
6 changes: 6 additions & 0 deletions include/deal.II/base/bounding_box_data_out.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@
#include <deal.II/boost_adaptors/segment.h>

DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
# define BOOST_ALLOW_DEPRECATED_HEADERS
#endif
#include <boost/geometry/index/rtree.hpp>
#include <boost/geometry/strategies/strategies.hpp>
#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
# undef BOOST_ALLOW_DEPRECATED_HEADERS
#endif
DEAL_II_ENABLE_EXTRA_DIAGNOSTICS


Expand Down
3 changes: 3 additions & 0 deletions include/deal.II/base/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@
/* cmake/modules/FindSYMENGINE.cmake */
#cmakedefine DEAL_II_SYMENGINE_WITH_LLVM

/* cmake/configure/configure_2_boost.cmake */
#cmakedefine DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS

/* cmake/configure/configure_2_trilinos.cmake */
#cmakedefine DEAL_II_TRILINOS_CXX_SUPPORTS_SACADO_COMPLEX_RAD
#cmakedefine DEAL_II_TRILINOS_WITH_EPETRAEXT
Expand Down
1 change: 0 additions & 1 deletion include/deal.II/grid/grid_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
# include <boost/archive/binary_iarchive.hpp>
# include <boost/archive/binary_oarchive.hpp>
# include <boost/geometry/index/rtree.hpp>
# include <boost/random/mersenne_twister.hpp>
# include <boost/serialization/array.hpp>
# include <boost/serialization/vector.hpp>
Expand Down
8 changes: 8 additions & 0 deletions include/deal.II/numerics/rtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,16 @@
#include <deal.II/boost_adaptors/segment.h>

DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
#include <boost/geometry/algorithms/distance.hpp>

#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
# define BOOST_ALLOW_DEPRECATED_HEADERS
#endif
#include <boost/geometry/index/rtree.hpp>
#include <boost/geometry/strategies/strategies.hpp>
#ifdef DEAL_II_BOOST_HAS_BROKEN_HEADER_DEPRECATIONS
# undef BOOST_ALLOW_DEPRECATED_HEADERS
#endif
DEAL_II_ENABLE_EXTRA_DIAGNOSTICS

#include <memory>
Expand Down
1 change: 1 addition & 0 deletions tests/boost/rtree_01.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <deal.II/boost_adaptors/point.h>

#include <boost/geometry/algorithms/distance.hpp>
#include <boost/geometry/index/rtree.hpp>
#include <boost/geometry/strategies/strategies.hpp>

Expand Down