From aa2c2ffe5ad006cdee376e9c6850f615eac13b4d Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Mon, 22 Apr 2013 14:39:06 +0000 Subject: Feed Clang a pragma to ignore -Wc++11-extensions to let it build Skia on Mac. Tested: CXX=clang++ ./gyp_skia && ninja -C out/Debug && CXX=G++ ./gyp_skia && ninja -C out/Debug && echo "ok" Got to ok. BUG= R=bungeman@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/14365009 git-svn-id: http://skia.googlecode.com/svn/trunk@8799 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkPostConfig.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/core') diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h index 86393ed446..64768c6faf 100644 --- a/include/core/SkPostConfig.h +++ b/include/core/SkPostConfig.h @@ -322,6 +322,11 @@ #if defined(_MSC_VER) #define SK_OVERRIDE override #elif defined(__clang__) && !defined(SK_BUILD_FOR_IOS) + // Clang defaults to C++03 and warns about using override. Squelch that. Intentionally no + // push/pop here so all users of SK_OVERRIDE ignore the warning too. This is like passing + // -Wno-c++11-extensions, except that GCC won't die (because it won't see this pragma). + #pragma clang diagnostic ignored "-Wc++11-extensions" + #if __has_feature(cxx_override_control) // Some documentation suggests we should be using __attribute__((override)), // but it doesn't work. -- cgit v1.2.3