1# Distributed under the OSI-approved BSD 3-Clause License. See accompanying 2# file Copyright.txt or https://cmake.org/licensing for details. 3 4#[=======================================================================[.rst: 5TestForANSIStreamHeaders 6------------------------ 7 8Test for compiler support of ANSI stream headers iostream, etc. 9 10check if the compiler supports the standard ANSI iostream header 11(without the .h) 12 13:: 14 15 CMAKE_NO_ANSI_STREAM_HEADERS - defined by the results 16#]=======================================================================] 17 18include(${CMAKE_CURRENT_LIST_DIR}/CheckIncludeFileCXX.cmake) 19 20if(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.") 25 else () 26 set (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL 27 "Does the compiler support headers like iostream.") 28 endif () 29 30 mark_as_advanced(CMAKE_NO_ANSI_STREAM_HEADERS) 31endif() 32 33 34