Ports:
* https://reviews.llvm.org/D84023
* https://reviews.llvm.org/rG4f5ccc72f6a6e
(but see https://reviews.llvm.org/rG4901199f5b84b223)
No intended behavior change.
cflags += [ "/EHs-c-" ]
cflags_cc += [ "/std:c++17" ]
+ # cl.exe doesn't set __cplusplus correctly by default.
+ # clang-cl gets it right by default, so don't needlessly add the flag there.
+ if (!is_clang) {
+ cflags_cc += [ "/Zc:__cplusplus" ]
+ }
+
# The MSVC default value (1 MB) is not enough for parsing recursive C++
# templates in Clang.
ldflags += [ "/STACK:10000000" ]
"googletest/include",
]
- # LLVM requires C++11 but gtest doesn't correctly detect the availability
- # of C++11 on MSVC, so we force it on.
- defines = [ "GTEST_LANG_CXX11" ]
+ defines = []
if (host_os == "win") {
defines += [ "GTEST_OS_WINDOWS" ]
}