]> git-server-git.apps.pok.os.sepia.ceph.com Git - googletest.git/commitdiff
Fixes compatibility with Visual Age versions lower than 9.0 (by Hady Zalek); updates...
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>
Fri, 26 Mar 2010 05:35:42 +0000 (05:35 +0000)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>
Fri, 26 Mar 2010 05:35:42 +0000 (05:35 +0000)
CHANGES
CMakeLists.txt
include/gtest/internal/gtest-port.h

diff --git a/CHANGES b/CHANGES
index 90a954040991c5d84933435da1be8f319d378b09..e574415ee6ed81cf492be295346c444eeb10ce88 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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.
 
index e8d18bd0bf0764ca1934381ce62bc4b46a89bf81..4c80bdef57b2d8674040fc5155a8c51f76fafe6c 100644 (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.
index 1b2d2decb1fd5269dbb791fa096a95302979274c..66cfe46ec5fd97aefddcf2ae632eb90c8c3cea23 100644 (file)
 #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
 
 #else
 
-// Unknown compiler - assume RTTI is enabled.
+// For all other compilers, we assume RTTI is enabled.
 #define GTEST_HAS_RTTI 1
 
 #endif  // _MSC_VER