From 1e908873eb34f2ae5473e5ed88e2bf5ba574e068 Mon Sep 17 00:00:00 2001 From: vladlosev Date: Mon, 5 Apr 2010 20:50:36 +0000 Subject: CMake 2.8/Visual Age compatibility patch by Hady Zalek. --- CMakeLists.txt | 6 ++++-- 1 file 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 -- cgit v0.12