]> granicus.if.org Git - icinga2/commitdiff
Don't warn that Boost.Coroutine v1 is deprecated
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Fri, 15 Feb 2019 12:32:55 +0000 (13:32 +0100)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 1 Apr 2019 09:40:14 +0000 (11:40 +0200)
CMakeLists.txt
lib/base/io-engine.hpp

index a3ee2e503bfbd7dd6aa43590f3c281364c245d3e..2b53844fd53f75530ee9f0c938101ce3ba2431bb 100644 (file)
@@ -134,6 +134,11 @@ endif()
 
 find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS context coroutine date_time thread system program_options regex REQUIRED)
 
+# Boost.Coroutine2 (the successor of Boost.Coroutine)
+# (1) doesn't even exist in old Boost versions and
+# (2) isn't supported by ASIO, yet.
+add_definitions(-DBOOST_COROUTINES_NO_DEPRECATION_WARNING)
+
 link_directories(${Boost_LIBRARY_DIRS})
 include_directories(${Boost_INCLUDE_DIRS})
 
index ada80d1ca405b09582020ba38db1f47d71a055de..e383b2e421cebfbbee8752f6a4c5ac1322fcbc40 100644 (file)
 #ifndef IO_ENGINE_H
 #define IO_ENGINE_H
 
-/**
- * Boost.Coroutine2 (the successor of Boost.Coroutine)
- * (1) doesn't even exist in old Boost versions and
- * (2) isn't supported by ASIO, yet.
- */
-#define BOOST_COROUTINES_NO_DEPRECATION_WARNING 1
-
 #include "base/lazy-init.hpp"
 #include <atomic>
 #include <memory>