mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Conditionally compile clang pragmas
This commit is contained in:
parent
c1dbc9c22b
commit
cda21492a8
@ -9,11 +9,12 @@
|
|||||||
#ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED
|
#ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED
|
||||||
#define TWOBLUECUBES_CATCH_HPP_INCLUDED
|
#define TWOBLUECUBES_CATCH_HPP_INCLUDED
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wno-global-constructors"
|
#pragma clang diagnostic ignored "-Wno-global-constructors"
|
||||||
|
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wpadded"
|
#pragma clang diagnostic ignored "-Wpadded"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "internal/catch_notimplemented_exception.h"
|
#include "internal/catch_notimplemented_exception.h"
|
||||||
#include "internal/catch_context.h"
|
#include "internal/catch_context.h"
|
||||||
@ -132,6 +133,8 @@
|
|||||||
|
|
||||||
using Catch::Detail::Approx;
|
using Catch::Detail::Approx;
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CATCH_HPP_INCLUDED
|
#endif // TWOBLUECUBES_CATCH_HPP_INCLUDED
|
||||||
|
@ -9,8 +9,10 @@
|
|||||||
// Collect all the implementation files together here
|
// Collect all the implementation files together here
|
||||||
// These are the equivalent of what would usually be cpp files
|
// These are the equivalent of what would usually be cpp files
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wweak-vtables"
|
#pragma clang diagnostic ignored "-Wweak-vtables"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "catch_runner.hpp"
|
#include "catch_runner.hpp"
|
||||||
#include "catch_registry_hub.hpp"
|
#include "catch_registry_hub.hpp"
|
||||||
@ -52,4 +54,6 @@ namespace Catch {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
@ -33,11 +33,15 @@ inline id performOptionalSelector( id obj, SEL sel ) {
|
|||||||
#else
|
#else
|
||||||
inline void arcSafeRelease( NSObject* ){}
|
inline void arcSafeRelease( NSObject* ){}
|
||||||
inline id performOptionalSelector( id obj, SEL sel ) {
|
inline id performOptionalSelector( id obj, SEL sel ) {
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||||
|
#endif
|
||||||
if( [obj respondsToSelector: sel] )
|
if( [obj respondsToSelector: sel] )
|
||||||
return [obj performSelector: sel];
|
return [obj performSelector: sel];
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
#define CATCH_UNSAFE_UNRETAINED __unsafe_unretained
|
#define CATCH_UNSAFE_UNRETAINED __unsafe_unretained
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
*/
|
*/
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wpadded"
|
#pragma clang diagnostic ignored "-Wpadded"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wpadded"
|
#pragma clang diagnostic ignored "-Wpadded"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
|
@ -5,7 +5,10 @@
|
|||||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wpadded"
|
#pragma clang diagnostic ignored "-Wpadded"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
#include "catch_self_test.hpp"
|
#include "catch_self_test.hpp"
|
||||||
|
@ -56,7 +56,9 @@ TEST_CASE( "meta/Misc/Sections", "looped tests" ) {
|
|||||||
CHECK( totals.assertions.failed == 1 );
|
CHECK( totals.assertions.failed == 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wweak-vtables"
|
#pragma clang diagnostic ignored "-Wweak-vtables"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../../include/internal/catch_commandline.hpp"
|
#include "../../include/internal/catch_commandline.hpp"
|
||||||
#include "../../include/reporters/catch_reporter_basic.hpp"
|
#include "../../include/reporters/catch_reporter_basic.hpp"
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wpadded"
|
#pragma clang diagnostic ignored "-Wpadded"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wpadded"
|
#pragma clang diagnostic ignored "-Wpadded"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
#include "catch_self_test.hpp"
|
#include "catch_self_test.hpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user