Fixes compatibility with Visual Age versions lower than 9.0 (by Hady Zalek); updates the release notes.

This commit is contained in:
zhanyong.wan 2010-03-26 05:35:42 +00:00
parent 2429dfc641
commit 3569c3c86d
3 changed files with 18 additions and 19 deletions

15
CHANGES
View File

@ -1,16 +1,17 @@
Changes for 1.5.0:
* New feature: Ability to use test assertions in multi-threaded tests
on platforms implementing pthreads.
* New feature: Predicates used inside EXPECT_TRUE() and friends
* New feature: assertions can be safely called in multiple threads
where the pthreads library is available.
* New feature: predicates used inside EXPECT_TRUE() and friends
can now generate custom failure messages.
* New feature: Google Test can now be compiled as a DLL on Windows.
* New feature: The distribution package now includes fused source files.
* New feature: Prints help when encountering unrecognized Google Test flags.
* New feature: Google Test can now be compiled as a DLL.
* New feature: fused source files are included.
* New feature: prints help when encountering unrecognized Google Test flags.
* Experimental feature: CMake build script (requires CMake 2.6.4+).
* Experimental feature: the Pump script for meta programming.
* double values streamed to an assertion are printed with enough precision
to differentiate any two different values.
* Google Test now works on Solaris.
* Google Test now works on Solaris and AIX.
* Build and test script improvements.
* Bug fixes and implementation clean-ups.

View File

@ -88,7 +88,10 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "VisualAge")
set(cxx_exception_flags "-qeh")
set(cxx_no_exception_flags "-qnoeh")
set(cxx_no_rtti_flags "-qnortti")
# 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()
if (CMAKE_USE_PTHREADS_INIT) # The pthreads library is available.

View File

@ -335,24 +335,19 @@
#define GTEST_HAS_RTTI 0
#endif
#elif defined(__GNUC__)
// Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled.
#if GTEST_GCC_VER_ >= 40302
#elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302)
#ifdef __GXX_RTTI
#define GTEST_HAS_RTTI 1
#else
#define GTEST_HAS_RTTI 0
#endif // __GXX_RTTI
#else
// For gcc versions smaller than 4.3.2, we assume RTTI is enabled.
#define GTEST_HAS_RTTI 1
#endif // GTEST_GCC_VER >= 40302
#elif defined(__IBMCPP__)
// 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)
// IBM Visual Age defines __RTTI_ALL__ to 1 if both the typeid and
// dynamic_cast features are present.
#ifdef __RTTI_ALL__
#define GTEST_HAS_RTTI 1
#else
@ -361,7 +356,7 @@
#else
// Unknown compiler - assume RTTI is enabled.
// For all other compilers, we assume RTTI is enabled.
#define GTEST_HAS_RTTI 1
#endif // _MSC_VER