CMake 2.8/Visual Age compatibility patch by Hady Zalek.

This commit is contained in:
vladlosev 2010-04-05 20:50:36 +00:00
parent b9a7cead1c
commit 1e908873eb

View File

@ -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