From 6f427452506dc85c88ffcbf5373b7eb8e21c60cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 17 Feb 2014 23:10:24 +0100 Subject: [PATCH] Silence deprecated warnings in internals of deprecated build. Together with recent Corrade changes is Magnum compiling without any noise again (i.e. just one line of output from Ninja). --- src/Magnum/Framebuffer.cpp | 7 +++++++ src/Magnum/Test/DebugGLTest.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/Magnum/Framebuffer.cpp b/src/Magnum/Framebuffer.cpp index 4bb281504..d0fd4ef75 100644 --- a/src/Magnum/Framebuffer.cpp +++ b/src/Magnum/Framebuffer.cpp @@ -221,7 +221,14 @@ Framebuffer& Framebuffer::attachTextureLayer(Framebuffer::BufferAttachment attac #ifdef MAGNUM_BUILD_DEPRECATED Framebuffer& Framebuffer::attachTexture2D(BufferAttachment attachment, Texture2D& texture, Int mipLevel) { + #ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" + #endif (this->*Context::current()->state().framebuffer->texture2DImplementation)(attachment, GLenum(texture.target()), texture.id(), mipLevel); + #ifdef __GNUC__ + #pragma GCC diagnostic pop + #endif return *this; } #endif diff --git a/src/Magnum/Test/DebugGLTest.cpp b/src/Magnum/Test/DebugGLTest.cpp index 5b21df178..38a5e95e9 100644 --- a/src/Magnum/Test/DebugGLTest.cpp +++ b/src/Magnum/Test/DebugGLTest.cpp @@ -111,7 +111,14 @@ void DebugGLTest::insertMessageFallback() { #ifdef MAGNUM_BUILD_DEPRECATED void DebugGLTest::deprecated() { + #ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" + #endif DebugMarker::mark("hello"); + #ifdef __GNUC__ + #pragma GCC diagnostic pop + #endif MAGNUM_VERIFY_NO_ERROR(); }