Disable a couple of warnings generated by the GTest and GMock headers
authorChristopher Dykes <cdykes@fb.com>
Wed, 9 Nov 2016 23:13:25 +0000 (15:13 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Wed, 9 Nov 2016 23:23:36 +0000 (15:23 -0800)
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
folly/portability/GTest.h

index 9c9c880d212b7b775972f30827ebcc93a4b58756..8b10d631c5751b0205c828702a434815166d3d5c 100755 (executable)
 #include <folly/portability/Unistd.h>
 #include <folly/portability/Windows.h>
 
+#include <folly/Portability.h>
+
+// 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 <gmock/gmock.h>
+FOLLY_POP_WARNING
index 18396f16f9c4691885b48d25d5d1f3054ccb8417..8040066253131e27afee9b7682f6bcf20aed3bd0 100755 (executable)
 #include <folly/portability/Unistd.h>
 #include <folly/portability/Windows.h>
 
+#include <folly/Portability.h>
+
+// 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 <gtest/gtest.h>
+FOLLY_POP_WARNING