summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-11-21 19:45:21 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-11-21 19:45:21 (GMT)
commit1e3ddfeecf636a5337eb57bd9959f5d738eed184 (patch)
tree9d98773e9162e0e74055ce9b0a68d086cd508117
parent02d423b250a8922fbc43f3f4d55d4bf1a182759f (diff)
downloadCMake-1e3ddfeecf636a5337eb57bd9959f5d738eed184.zip
CMake-1e3ddfeecf636a5337eb57bd9959f5d738eed184.tar.gz
CMake-1e3ddfeecf636a5337eb57bd9959f5d738eed184.tar.bz2
try to fix check for ansi stream
-rw-r--r--Modules/CheckIncludeFileCXX.cmake3
-rw-r--r--Modules/TestForANSIStreamHeaders.cmake10
2 files changed, 6 insertions, 7 deletions
diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake
index 9af8add..265bbfc 100644
--- a/Modules/CheckIncludeFileCXX.cmake
+++ b/Modules/CheckIncludeFileCXX.cmake
@@ -7,6 +7,7 @@
#
MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
+ MESSAGE(STATUS "Checking for CXX include file ${INCLUDE}")
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${PROJECT_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
@@ -16,8 +17,10 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_ANSI_CXXFLAGS}
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
+ MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
ELSE(${VARIABLE})
+ MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log
"Determining if the include file ${INCLUDE} "
diff --git a/Modules/TestForANSIStreamHeaders.cmake b/Modules/TestForANSIStreamHeaders.cmake
index 74fe831..11b18a5 100644
--- a/Modules/TestForANSIStreamHeaders.cmake
+++ b/Modules/TestForANSIStreamHeaders.cmake
@@ -3,18 +3,14 @@
#
# CMAKE_NO_ANSI_STREAM_HEADERS - defined accoreding to the results
#
+INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
- MESSAGE(STATUS "Check for ANSI stream headers")
- TRY_COMPILE(CMAKE_ANSI_STREAM_HEADERS ${PROJECT_BINARY_DIR}
- ${CMAKE_ROOT}/Modules/TestForANSIStreamHeaders.cxx
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_ANSI_CXXFLAGS})
+ CHECK_INCLUDE_FILE_CXX(iostream CMAKE_ANSI_STREAM_HEADERS)
IF (CMAKE_ANSI_STREAM_HEADERS)
- MESSAGE(STATUS "Check for ANSI stream headers - found")
SET (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL
"Does the compiler support headers like iostream.")
- ELSE (CMAKE_ANSI_STREAM_HEADERS)
- MESSAGE(STATUS "Check for ANSI stream headers - not found")
+ ELSE (CMAKE_ANSI_STREAM_HEADERS)
SET (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL
"Does the compiler support headers like iostream.")
ENDIF (CMAKE_ANSI_STREAM_HEADERS)