9db3116226
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
35 lines
1.3 KiB
CMake
35 lines
1.3 KiB
CMake
# - 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
|
|
#
|
|
|
|
#=============================================================================
|
|
# 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.
|
|
#=============================================================================
|
|
# (To distribute this file outside of CMake, substitute the full
|
|
# License text for the above reference.)
|
|
|
|
include(CheckIncludeFileCXX)
|
|
|
|
if(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
|
|
CHECK_INCLUDE_FILE_CXX(iostream CMAKE_ANSI_STREAM_HEADERS)
|
|
if (CMAKE_ANSI_STREAM_HEADERS)
|
|
set (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL
|
|
"Does the compiler support headers like iostream.")
|
|
else ()
|
|
set (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL
|
|
"Does the compiler support headers like iostream.")
|
|
endif ()
|
|
|
|
mark_as_advanced(CMAKE_NO_ANSI_STREAM_HEADERS)
|
|
endif()
|
|
|
|
|