From 1dcc41cf51197f9497b5e24f2f310a39649f3132 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Wed, 9 Nov 2016 15:13:25 -0800 Subject: [PATCH] Disable a couple of warnings generated by the GTest and GMock headers Summary: As the comment says, this disables a couple of warnings related to exporting classes derived from stdlib classes that aren't explicitly exported. Reviewed By: yfeldblum Differential Revision: D4155978 fbshipit-source-id: 6e732b53c280a3bc3a39b2128cd577ba7cb70408 --- folly/portability/GMock.h | 8 ++++++++ folly/portability/GTest.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/folly/portability/GMock.h b/folly/portability/GMock.h index 9c9c880d..8b10d631 100755 --- a/folly/portability/GMock.h +++ b/folly/portability/GMock.h @@ -22,4 +22,12 @@ #include #include +#include + +// Disable a couple of warnings due to GMock exporting classes +// that derive from stdlib classes which aren't explicitly exported. +FOLLY_PUSH_WARNING +FOLLY_MSVC_DISABLE_WARNING(4251) +FOLLY_MSVC_DISABLE_WARNING(4275) #include +FOLLY_POP_WARNING diff --git a/folly/portability/GTest.h b/folly/portability/GTest.h index 18396f16..80400662 100755 --- a/folly/portability/GTest.h +++ b/folly/portability/GTest.h @@ -22,4 +22,12 @@ #include #include +#include + +// Disable a couple of warnings due to GTest exporting classes +// that derive from stdlib classes which aren't explicitly exported. +FOLLY_PUSH_WARNING +FOLLY_MSVC_DISABLE_WARNING(4251) +FOLLY_MSVC_DISABLE_WARNING(4275) #include +FOLLY_POP_WARNING -- 2.34.1