philsquared/Catch — pull request #331 by nanoant (2014-09-17 14:12:40+00:00)
Title: Fix ICC C++ compiler warnings on OS X

ICC C++ compiler icpc takes all defined macros from existing clang, so
__clang__ is defined as well for icpc, yet it does not support #pragma clang.

So prior using #pragma clang we shall check if it is not icpc compiler.

This fixes tens of warnings when using iclc, e.g.:

lib/catch/include/internal/catch_ptr.hpp(14): warning #161: unrecognized #pragma
#pragma clang diagnostic push
^

In file included from lib/catch/include/internal/catch_context.h(12),
from lib/catch/include/catch.hpp(26),
from src/2d_strip/strip_detector_test.cpp(1):
lib/catch/include/internal/catch_ptr.hpp(15): warning #161: unrecognized #pragma
#pragma clang diagnostic ignored "-Wpadded"
^

In file included from /Applications/Xcode-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector(274),
from lib/catch/include/internal/catch_context.h(15),
from lib/catch/include/catch.hpp(26),
from src/2d_strip/strip_detector_test.cpp(1):
lib/catch/include/internal/catch_ptr.hpp(91): warning #161: unrecognized #pragma
#pragma clang diagnostic pop
^

In file included from lib/catch/include/catch.hpp(39),
from src/2d_strip/strip_detector_test.cpp(1):
lib/catch/include/internal/catch_test_case_info.h(18): warning #161: unrecognized #pragma
#pragma clang diagnostic push
^

In file included from lib/catch/include/catch.hpp(39),
from src/2d_strip/strip_detector_test.cpp(1):
lib/catch/include/internal/catch_test_case_info.h(19): warning #161: unrecognized #pragma
#pragma clang diagnostic ignored "-Wpadded"
^

In file included from src/2d_strip/strip_detector_test.cpp(1):
lib/catch/include/internal/catch_test_case_info.h(87): warning #161: unrecognized #pragma
#pragma clang diagnostic pop
^

In file included from src/2d_strip/strip_detector_test.cpp(5):
lib/catch/include/internal/catch_reenable_warnings.h(12): warning #161: unrecognized #pragma
#pragma clang diagnostic pop