summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeBackwardCompatibilityCXX.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-01-08 17:12:15 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-01-08 17:12:15 (GMT)
commit4d6dba4c37928026b577870e93128e55cd16a24f (patch)
treeaccd0180545ce70a9491bdf54bda9c0cdfe54e22 /Modules/CMakeBackwardCompatibilityCXX.cmake
parent8b1d032b7beb96ba7931939bda46eb70a8434310 (diff)
downloadCMake-4d6dba4c37928026b577870e93128e55cd16a24f.zip
CMake-4d6dba4c37928026b577870e93128e55cd16a24f.tar.gz
CMake-4d6dba4c37928026b577870e93128e55cd16a24f.tar.bz2
ENH: only force the use of ansi flags in backwards mode
Diffstat (limited to 'Modules/CMakeBackwardCompatibilityCXX.cmake')
-rw-r--r--Modules/CMakeBackwardCompatibilityCXX.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeBackwardCompatibilityCXX.cmake b/Modules/CMakeBackwardCompatibilityCXX.cmake
index c11d56d..7c4554e 100644
--- a/Modules/CMakeBackwardCompatibilityCXX.cmake
+++ b/Modules/CMakeBackwardCompatibilityCXX.cmake
@@ -22,12 +22,14 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
ENDIF(CMAKE_CXX_ACCEPTS_FLAGS)
ENDIF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
-
+ SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIStreamHeaders.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/TestForANSIForScope.cmake)
CHECK_INCLUDE_FILE_CXX("sstream" CMAKE_HAS_ANSI_STRING_STREAM)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}")
IF(NOT CMAKE_HAS_ANSI_STRING_STREAM)
SET( CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL
"Does the compiler support sstream or stringstream.")