1 # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 # file Copyright.txt or https://cmake.org/licensing for details.
4 #[=======================================================================[.rst:
5 TestForANSIStreamHeaders
6 ------------------------
8 Test for compiler support of ANSI stream headers iostream, etc.
10 check if the compiler supports the standard ANSI iostream header
15 CMAKE_NO_ANSI_STREAM_HEADERS - defined by the results
16 #]=======================================================================]
18 include(${CMAKE_CURRENT_LIST_DIR}/CheckIncludeFileCXX.cmake)
20 if(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
21 CHECK_INCLUDE_FILE_CXX(iostream CMAKE_ANSI_STREAM_HEADERS)
22 if (CMAKE_ANSI_STREAM_HEADERS)
23 set (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL
24 "Does the compiler support headers like iostream.")
26 set (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL
27 "Does the compiler support headers like iostream.")
30 mark_as_advanced(CMAKE_NO_ANSI_STREAM_HEADERS)