File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
secondary/third-party/unittest Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,12 @@ config("compiler_defaults") {
183
183
cflags += [ " /EHs-c-" ]
184
184
cflags_cc += [ " /std:c++17" ]
185
185
186
+ # cl.exe doesn't set __cplusplus correctly by default.
187
+ # clang-cl gets it right by default, so don't needlessly add the flag there.
188
+ if (! is_clang ) {
189
+ cflags_cc += [ " /Zc:__cplusplus" ]
190
+ }
191
+
186
192
# The MSVC default value (1 MB) is not enough for parsing recursive C++
187
193
# templates in Clang.
188
194
ldflags += [ " /STACK:10000000" ]
Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ config("googletest_config") {
7
7
" googletest/include" ,
8
8
]
9
9
10
- # LLVM requires C++11 but gtest doesn't correctly detect the availability
11
- # of C++11 on MSVC, so we force it on.
12
- defines = [ " GTEST_LANG_CXX11" ]
10
+ defines = []
13
11
if (host_os == " win" ) {
14
12
defines += [ " GTEST_OS_WINDOWS" ]
15
13
}
You can’t perform that action at this time.
0 commit comments