diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2003-01-08 17:12:15 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2003-01-08 17:12:15 (GMT) |
commit | 4d6dba4c37928026b577870e93128e55cd16a24f (patch) | |
tree | accd0180545ce70a9491bdf54bda9c0cdfe54e22 /Modules | |
parent | 8b1d032b7beb96ba7931939bda46eb70a8434310 (diff) | |
download | CMake-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')
-rw-r--r-- | Modules/CMakeBackwardCompatibilityCXX.cmake | 4 | ||||
-rw-r--r-- | Modules/CheckIncludeFileCXX.cmake | 1 | ||||
-rw-r--r-- | Modules/TestForANSIForScope.cmake | 3 | ||||
-rw-r--r-- | Modules/TestForSTDNamespace.cmake | 3 |
4 files changed, 5 insertions, 6 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.") diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index 75ab187..f8d7401 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -15,7 +15,6 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) TRY_COMPILE(${VARIABLE} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_ANSI_CXXFLAGS} OUTPUT_VARIABLE OUTPUT) IF(${VARIABLE}) MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- found") diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake index 0192062..12b770c 100644 --- a/Modules/TestForANSIForScope.cmake +++ b/Modules/TestForANSIForScope.cmake @@ -7,8 +7,7 @@ IF(NOT CMAKE_ANSI_FOR_SCOPE) MESSAGE(STATUS "Check for ANSI scope") TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${CMAKE_BINARY_DIR} - ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_ANSI_CXXFLAGS}) + ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx) IF (CMAKE_ANSI_FOR_SCOPE) MESSAGE(STATUS "Check for ANSI scope - found") SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake index 1bb8106..89e559e 100644 --- a/Modules/TestForSTDNamespace.cmake +++ b/Modules/TestForSTDNamespace.cmake @@ -7,8 +7,7 @@ IF(NOT CMAKE_STD_NAMESPACE) MESSAGE(STATUS "Check for STD namespace") TRY_COMPILE(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR} - ${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_ANSI_CXXFLAGS}) + ${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx) IF (CMAKE_STD_NAMESPACE) MESSAGE(STATUS "Check for STD namespace - found") SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL |