mirror of
https://github.com/google/googletest.git
synced 2026-10-28 18:07:18 +08:00
Remove some obsolete GCC workarounds
PiperOrigin-RevId: 974635453 Change-Id: I7bb066be8461080d6f908671d2001dbca3ee4a03
This commit is contained in:
parent
c06edf0146
commit
4957858705
@ -113,16 +113,10 @@ macro(config_compiler_and_linker)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif (CMAKE_COMPILER_IS_GNUCXX)
|
elseif (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set(cxx_base_flags "-Wall -Wshadow -Wundef")
|
set(cxx_base_flags "-Wall -Wshadow -Wundef -Wno-error=dangling-else")
|
||||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
|
|
||||||
set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else")
|
|
||||||
endif()
|
|
||||||
set(cxx_exception_flags "-fexceptions")
|
set(cxx_exception_flags "-fexceptions")
|
||||||
set(cxx_no_exception_flags "-fno-exceptions")
|
set(cxx_no_exception_flags "-fno-exceptions")
|
||||||
# Until version 4.3.2, GCC doesn't define a macro to indicate
|
set(cxx_no_rtti_flags "-fno-rtti")
|
||||||
# whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
|
|
||||||
# explicitly.
|
|
||||||
set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0")
|
|
||||||
set(cxx_strict_flags
|
set(cxx_strict_flags
|
||||||
"-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
|
"-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
|
||||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
||||||
|
|||||||
@ -341,13 +341,6 @@
|
|||||||
#define GTEST_INIT_GOOGLE_TEST_NAME_ "testing::InitGoogleTest"
|
#define GTEST_INIT_GOOGLE_TEST_NAME_ "testing::InitGoogleTest"
|
||||||
#endif // !defined(GTEST_INIT_GOOGLE_TEST_NAME_)
|
#endif // !defined(GTEST_INIT_GOOGLE_TEST_NAME_)
|
||||||
|
|
||||||
// Determines the version of gcc that is used to compile this.
|
|
||||||
#ifdef __GNUC__
|
|
||||||
// 40302 means version 4.3.2.
|
|
||||||
#define GTEST_GCC_VER_ \
|
|
||||||
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
|
||||||
#endif // __GNUC__
|
|
||||||
|
|
||||||
// Macros for disabling Microsoft Visual C++ warnings.
|
// Macros for disabling Microsoft Visual C++ warnings.
|
||||||
//
|
//
|
||||||
// GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385)
|
// GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user