Commit aaf867d2 authored by Guillaume Pasero's avatar Guillaume Pasero

WRG: try to adapt diagnostics with compiler versions

parent bd84be52
Pipeline #3231 passed with stages
in 65 minutes and 39 seconds
......@@ -28,9 +28,12 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wc++11-extensions"
#if defined(__apple_build_version__) && __apple_build_version__ < 7000053
#if defined(__apple_build_version__)
/* Apple's 3.6.0 based clang doesn't support -Winconsistent-missing-override */
#else
#if __apple_build_version__ >= 7000053
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#elif __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 7)
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
......
......@@ -24,14 +24,25 @@
#include "itkMacro.h"
#include "otbMath.h"
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winconsistent-missing-override"
#if defined(__clang__)
#pragma clang diagnostic push
#if defined(__apple_build_version__)
/* Apple's 3.6.0 based clang doesn't support -Winconsistent-missing-override */
#if __apple_build_version__ >= 7000053
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#elif __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 7)
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#include "mpParser.h"
#pragma GCC diagnostic pop
#pragma clang diagnostic pop
#else
#include "mpParser.h"
#endif
#include <vector>
namespace otb
......
......@@ -410,7 +410,15 @@ public:
protected:
#if defined(__clang__)
#pragma clang diagnostic push
#if defined(__apple_build_version__)
/* Apple's 3.6.0 based clang doesn't support -Winconsistent-missing-override */
#if __apple_build_version__ >= 7000053
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#elif __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 7)
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
TYPE_DATA
#pragma clang diagnostic pop
#else
......
......@@ -106,7 +106,14 @@ namespace ossimplugins
protected:
#if defined(__clang__)
#pragma clang diagnostic push
#if defined(__apple_build_version__)
/* Apple's 3.6.0 based clang doesn't support -Winconsistent-missing-override */
#if __apple_build_version__ >= 7000053
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#elif __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 7)
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
TYPE_DATA
#pragma clang diagnostic pop
#else
......
......@@ -144,7 +144,15 @@ namespace ossimplugins
protected:
#if defined(__clang__)
#pragma clang diagnostic push
#if defined(__apple_build_version__)
/* Apple's 3.6.0 based clang doesn't support -Winconsistent-missing-override */
#if __apple_build_version__ >= 7000053
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#elif __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 7)
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
TYPE_DATA
#pragma clang diagnostic pop
#else
......
......@@ -33,7 +33,16 @@
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wheader-guard"
#if defined(__apple_build_version__)
/* Need AppleClang >= 9.0.0 to support -Wexpansion-to-defined */
#if __apple_build_version__ >= 9000000
#pragma clang diagnostic ignored "-Wexpansion-to-defined"
#endif
#elif __clang_major__ > 3
#pragma clang diagnostic ignored "-Wexpansion-to-defined"
#endif
#endif
#endif
#include "otb_shark.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment