0

In my cmake file, I am specifying add_definitions ( -DBOOST_SIGNALS_NO_DEPRECATION_WARNING ). However, I am still seeing the warning warning: #warning "Boost.Signals is no longer being maintained and is now deprecated. Please switch to Boost.Signals2. To disable this warning message, define BOOST_SIGNALS_NO_DEPRECATION_WARNING." [-Wcpp]. How do I properly define BOOST_SIGNALS_NO_DEPRECATION_WARNING?

edit

This cmake file generates a make file. I get the error during the execution of the Makefile. I can't edit the CMakeLists.txt file. Is it possible to set this flag to be on for the generated Makefile using a cmake file?

kilojoules
  • 9,768
  • 18
  • 77
  • 149
  • That should work. Are you sure you've not got a typo? If not, you'll need to at least show us your CMakeLists.txt. – Fraser Jun 10 '15 at 21:42
  • This cmake file generates a make file. I get the error during the execution of the `Makefile`. I can't edit the CMakeLists.txt file. Is it possible to set this flag to be on for the generated `Makefile` using a cmake file? – kilojoules Jun 10 '15 at 21:45
  • 1
    That's a bit confusing! Anyway, depending on how the CMakeLists.txt is written, you might get away with running CMake like this: `cmake . -DCMAKE_CXX_FLAGS=-DBOOST_SIGNALS_NO_DEPRECATION_WARNING`. That's not as good an option though as setting the definition in the CMakeLists.txt. – Fraser Jun 10 '15 at 22:06
  • Something I can stick in the cmake file would of course be ideal, but it looks like it simply cannot be done in this situation – kilojoules Jun 12 '15 at 04:36

0 Answers0