Note when building CGAL code: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated

Viewed 1115

When I build the CGAL examples with cmake, I get this note:

#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.

I tried to add #define BOOST_BIND_NO_PLACEHOLDERS at the very beginning of the code and using namespace BOOST_BIND_GLOBAL_PLACEHOLDERS in the main, but it doesn't work. The code can be built, just a very annoying note.

BOOST VERSION = 1.73 GCC VERSION = 7.5.0

1 Answers

For the convenience of old projects, add the following line into CMakeLists.txt to define BOOST_BIND_GLOBAL_PLACEHOLDERS in the whole project.

add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
Related