1 # - Test for compiler support of ANSI stream headers iostream, etc.
2 # check if the compiler supports the standard ANSI iostream header (without the .h)
3 # CMAKE_NO_ANSI_STREAM_HEADERS - defined by the results
6 #=============================================================================
7 # Copyright 2002-2009 Kitware, Inc.
9 # Distributed under the OSI-approved BSD License (the "License");
10 # see accompanying file Copyright.txt for details.
12 # This software is distributed WITHOUT ANY WARRANTY; without even the
13 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 # See the License for more information.
15 #=============================================================================
16 # (To distribute this file outside of CMake, substitute the full
17 # License text for the above reference.)
19 include(${CMAKE_CURRENT_LIST_DIR}/CheckIncludeFileCXX.cmake)
21 if(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
22 CHECK_INCLUDE_FILE_CXX(iostream CMAKE_ANSI_STREAM_HEADERS)
23 if (CMAKE_ANSI_STREAM_HEADERS)
24 set (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL
25 "Does the compiler support headers like iostream.")
27 set (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL
28 "Does the compiler support headers like iostream.")
31 mark_as_advanced(CMAKE_NO_ANSI_STREAM_HEADERS)