summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-04-05 20:50:36 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-04-05 20:50:36 +0000
commit2082f7128be34e7fef9d4586ddbbcf5ab1d25ca2 (patch)
treed485ee0c19f21bde1aa9fddd52f353f134cd4ce3 /CMakeLists.txt
parent2d9d6341c1db471ce1520decd58fbdc39e46a457 (diff)
downloadgtest-2082f7128be34e7fef9d4586ddbbcf5ab1d25ca2.tar.gz
gtest-2082f7128be34e7fef9d4586ddbbcf5ab1d25ca2.tar.bz2
gtest-2082f7128be34e7fef9d4586ddbbcf5ab1d25ca2.tar.xz
CMake 2.8/Visual Age compatibility patch by Hady Zalek.
git-svn-id: http://googletest.googlecode.com/svn/trunk@409 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c80bde..7910b5d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,13 +79,15 @@ elseif (CMAKE_COMPILER_IS_GNUCXX)
# explicitly.
set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0")
set(cxx_strict_flags "-Wextra")
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro")
+elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
set(cxx_exception_flags "-features=except")
# Sun Pro doesn't provide macros to indicate whether exceptions and
# RTTI are enabled, so we define GTEST_HAS_* explicitly.
set(cxx_no_exception_flags "-features=no%except -DGTEST_HAS_EXCEPTIONS=0")
set(cxx_no_rtti_flags "-features=no%rtti -DGTEST_HAS_RTTI=0")
-elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "VisualAge")
+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