1 # - Test for compiler support of ANSI sstream header
2 # check if the compiler supports the standard ANSI sstream header
3 # CMAKE_NO_ANSI_STRING_STREAM - defined by the results
6 #=============================================================================
7 # Copyright 2006-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 if("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")
20 message(STATUS "Check for sstream")
21 try_compile(CMAKE_HAS_ANSI_STRING_STREAM ${CMAKE_BINARY_DIR}
22 ${CMAKE_ROOT}/Modules/TestForSSTREAM.cxx
23 OUTPUT_VARIABLE OUTPUT)
24 if (CMAKE_HAS_ANSI_STRING_STREAM)
25 message(STATUS "Check for sstream - found")
26 set (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL
27 "Does the compiler support sstream")
28 file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
29 "Determining if the CXX compiler has sstream passed with "
30 "the following output:\n${OUTPUT}\n\n")
32 message(STATUS "Check for sstream - not found")
33 set (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL
34 "Does the compiler support sstream")
35 file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
36 "Determining if the CXX compiler has sstream failed with "
37 "the following output:\n${OUTPUT}\n\n")