2013-10-15 19:17:36 +04:00
|
|
|
#.rst:
|
|
|
|
# TestForANSIStreamHeaders
|
|
|
|
# ------------------------
|
2002-09-12 19:14:50 +04:00
|
|
|
#
|
2013-10-15 19:17:36 +04:00
|
|
|
# Test for compiler support of ANSI stream headers iostream, etc.
|
|
|
|
#
|
|
|
|
# check if the compiler supports the standard ANSI iostream header
|
|
|
|
# (without the .h)
|
|
|
|
#
|
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# CMAKE_NO_ANSI_STREAM_HEADERS - defined by the results
|
2009-09-28 19:46:51 +04:00
|
|
|
|
|
|
|
#=============================================================================
|
|
|
|
# Copyright 2002-2009 Kitware, Inc.
|
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
2010-08-07 04:48:47 +04:00
|
|
|
# (To distribute this file outside of CMake, substitute the full
|
2009-09-28 19:46:51 +04:00
|
|
|
# License text for the above reference.)
|
|
|
|
|
2012-11-04 00:35:44 +04:00
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/CheckIncludeFileCXX.cmake)
|
2002-09-12 19:14:50 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
|
2002-11-21 22:45:21 +03:00
|
|
|
CHECK_INCLUDE_FILE_CXX(iostream CMAKE_ANSI_STREAM_HEADERS)
|
2012-08-13 21:47:32 +04:00
|
|
|
if (CMAKE_ANSI_STREAM_HEADERS)
|
|
|
|
set (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL
|
2002-11-18 18:52:09 +03:00
|
|
|
"Does the compiler support headers like iostream.")
|
2012-08-13 21:50:14 +04:00
|
|
|
else ()
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL
|
2002-09-12 19:14:50 +04:00
|
|
|
"Does the compiler support headers like iostream.")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2002-09-12 19:14:50 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
mark_as_advanced(CMAKE_NO_ANSI_STREAM_HEADERS)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2002-09-13 00:36:56 +04:00
|
|
|
|
2002-09-12 19:14:50 +04:00
|
|
|
|