Skip to content

Commit fed498b

Browse files
skruegerfacebook-github-bot
authored andcommitted
Add back GTest & GMock's msvc disable warnings and IWYU pragma exports
Reviewed By: Gownta Differential Revision: D68602524 fbshipit-source-id: bd8c35d235e4a28e023ca0248c5c337525199f74
1 parent 559a6ac commit fed498b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

folly/portability/GMock.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,14 @@
1616

1717
#pragma once
1818

19+
#include <folly/Portability.h>
20+
21+
// Disable a couple of warnings due to GMock exporting classes
22+
// that derive from stdlib classes which aren't explicitly exported.
23+
FOLLY_PUSH_WARNING
24+
FOLLY_MSVC_DISABLE_WARNING(4251)
25+
FOLLY_MSVC_DISABLE_WARNING(4275)
26+
// IWYU pragma: begin_exports
1927
#include <gmock/gmock.h>
28+
// IWYU pragma: end_exports
29+
FOLLY_POP_WARNING

folly/portability/GTest.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,14 @@
1616

1717
#pragma once
1818

19+
#include <folly/Portability.h>
20+
21+
// Disable a couple of warnings due to GTest exporting classes
22+
// that derive from stdlib classes which aren't explicitly exported.
23+
FOLLY_PUSH_WARNING
24+
FOLLY_MSVC_DISABLE_WARNING(4251)
25+
FOLLY_MSVC_DISABLE_WARNING(4275)
26+
// IWYU pragma: begin_exports
1927
#include <gtest/gtest.h>
28+
// IWYU pragma: end_exports
29+
FOLLY_POP_WARNING

0 commit comments

Comments
 (0)