mirror of
https://github.com/google/googletest.git
synced 2026-09-25 04:09:59 +03:00
Remove obsolete IBM VisualAge / XL C++ workarounds in googletest
Classic IBM XL C/C++ (__IBMCPP__) only supported up to C++14 (V16.1 for AIX) before IBM retired the proprietary frontend and transitioned to IBM Open XL C/C++ (which is Clang-based and defines __clang__). Since the legacy XL frontend never supported C++17, the workarounds are obsolete and should be removed. PiperOrigin-RevId: 975123206 Change-Id: Ia706c7759d3f1df73d375fca68f91eee3aaef825
This commit is contained in:
committed by
Copybara-Service
parent
5f31f20eda
commit
8ecdd89c69
@@ -119,16 +119,6 @@ macro(config_compiler_and_linker)
|
||||
set(cxx_no_rtti_flags "-fno-rtti")
|
||||
set(cxx_strict_flags
|
||||
"-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
|
||||
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "VisualAge" OR
|
||||
CMAKE_CXX_COMPILER_ID STREQUAL "XL")
|
||||
# CMake 2.8 changes Visual Age's compiler ID to "XL".
|
||||
set(cxx_exception_flags "-qeh")
|
||||
set(cxx_no_exception_flags "-qnoeh")
|
||||
# Until version 9.0, Visual Age doesn't define a macro to indicate
|
||||
# whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
|
||||
# explicitly.
|
||||
set(cxx_no_rtti_flags "-qnortti -DGTEST_HAS_RTTI=0")
|
||||
endif()
|
||||
|
||||
# The pthreads library is available and allowed?
|
||||
|
||||
@@ -465,9 +465,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
#elif defined(__GNUC__) && defined(__EXCEPTIONS) && __EXCEPTIONS
|
||||
// gcc defines __EXCEPTIONS to 1 if and only if exceptions are enabled.
|
||||
#define GTEST_HAS_EXCEPTIONS 1
|
||||
#elif defined(__IBMCPP__) && defined(__EXCEPTIONS) && __EXCEPTIONS
|
||||
// xlC defines __EXCEPTIONS to 1 if and only if exceptions are enabled.
|
||||
#define GTEST_HAS_EXCEPTIONS 1
|
||||
#else
|
||||
// For other compilers, we assume exceptions are disabled to be
|
||||
// conservative.
|
||||
@@ -596,16 +593,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
|
||||
#define GTEST_HAS_RTTI __has_feature(cxx_rtti)
|
||||
|
||||
// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
|
||||
// both the typeid and dynamic_cast features are present.
|
||||
#elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
|
||||
|
||||
#ifdef __RTTI_ALL__
|
||||
#define GTEST_HAS_RTTI 1
|
||||
#else
|
||||
#define GTEST_HAS_RTTI 0
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
// For all other compilers, we assume RTTI is enabled.
|
||||
@@ -727,7 +714,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
|
||||
// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
|
||||
// Sun Pro CC, IBM Visual Age, and HP aCC support.
|
||||
#if defined(__GNUC__) || defined(_MSC_VER) || defined(__IBMCPP__)
|
||||
#if defined(__GNUC__) || defined(_MSC_VER)
|
||||
#define GTEST_HAS_TYPED_TEST 1
|
||||
#define GTEST_HAS_TYPED_TEST_P 1
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user