Commit 1e3ddfee authored by Bill Hoffman's avatar Bill Hoffman

try to fix check for ansi stream

parent 02d423b2
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
# #
MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
MESSAGE(STATUS "Checking for CXX include file ${INCLUDE}")
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE}) SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${PROJECT_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE) ${PROJECT_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
...@@ -16,8 +17,10 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) ...@@ -16,8 +17,10 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_ANSI_CXXFLAGS} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_ANSI_CXXFLAGS}
OUTPUT_VARIABLE OUTPUT) OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE}) IF(${VARIABLE})
MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
ELSE(${VARIABLE}) ELSE(${VARIABLE})
MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log
"Determining if the include file ${INCLUDE} " "Determining if the include file ${INCLUDE} "
......
...@@ -3,18 +3,14 @@ ...@@ -3,18 +3,14 @@
# #
# CMAKE_NO_ANSI_STREAM_HEADERS - defined accoreding to the results # CMAKE_NO_ANSI_STREAM_HEADERS - defined accoreding to the results
# #
INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS) IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
MESSAGE(STATUS "Check for ANSI stream headers") CHECK_INCLUDE_FILE_CXX(iostream CMAKE_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})
IF (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 SET (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL
"Does the compiler support headers like iostream.") "Does the compiler support headers like iostream.")
ELSE (CMAKE_ANSI_STREAM_HEADERS) ELSE (CMAKE_ANSI_STREAM_HEADERS)
MESSAGE(STATUS "Check for ANSI stream headers - not found")
SET (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL SET (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL
"Does the compiler support headers like iostream.") "Does the compiler support headers like iostream.")
ENDIF (CMAKE_ANSI_STREAM_HEADERS) ENDIF (CMAKE_ANSI_STREAM_HEADERS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment