diff options
author | Kitware Robot <kwrobot@kitware.com> | 2012-08-13 17:47:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-13 18:19:16 (GMT) |
commit | 77543bde41b0e52c3959016698b529835945d62d (patch) | |
tree | ff63e5fbec326c4a5d821e7496c6d2cb52f75b92 /Modules/CheckIncludeFileCXX.cmake | |
parent | 7bbaa4283de26864b2e55e819db0884771585467 (diff) | |
download | CMake-77543bde41b0e52c3959016698b529835945d62d.zip CMake-77543bde41b0e52c3959016698b529835945d62d.tar.gz CMake-77543bde41b0e52c3959016698b529835945d62d.tar.bz2 |
Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands. Later command
names became case-insensitive. Now the preferred style is lower-case.
Run the following shell code:
cmake --help-command-list |
grep -v "cmake version" |
while read c; do
echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
Diffstat (limited to 'Modules/CheckIncludeFileCXX.cmake')
-rw-r--r-- | Modules/CheckIncludeFileCXX.cmake | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index f27d253..adc39f3 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -28,24 +28,24 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) - IF("${VARIABLE}" MATCHES "^${VARIABLE}$") - IF(CMAKE_REQUIRED_INCLUDES) - SET(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}") - ELSE(CMAKE_REQUIRED_INCLUDES) - SET(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS) - ENDIF(CMAKE_REQUIRED_INCLUDES) - SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS}) - SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE}) - CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in +macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) + if("${VARIABLE}" MATCHES "^${VARIABLE}$") + if(CMAKE_REQUIRED_INCLUDES) + set(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}") + else(CMAKE_REQUIRED_INCLUDES) + set(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS) + endif(CMAKE_REQUIRED_INCLUDES) + set(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS}) + set(CHECK_INCLUDE_FILE_VAR ${INCLUDE}) + configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE) - MESSAGE(STATUS "Looking for C++ include ${INCLUDE}") - IF(${ARGC} EQUAL 3) - SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS}) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARGV2}") - ENDIF(${ARGC} EQUAL 3) + message(STATUS "Looking for C++ include ${INCLUDE}") + if(${ARGC} EQUAL 3) + set(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARGV2}") + endif(${ARGC} EQUAL 3) - TRY_COMPILE(${VARIABLE} + try_compile(${VARIABLE} ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} @@ -54,24 +54,24 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) "${CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS}" OUTPUT_VARIABLE OUTPUT) - IF(${ARGC} EQUAL 3) - SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_SAVE}) - ENDIF(${ARGC} EQUAL 3) + if(${ARGC} EQUAL 3) + set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_SAVE}) + endif(${ARGC} EQUAL 3) - IF(${VARIABLE}) - MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - found") - SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + if(${VARIABLE}) + message(STATUS "Looking for C++ include ${INCLUDE} - found") + set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the include file ${INCLUDE} " "exists passed with the following output:\n" "${OUTPUT}\n\n") - ELSE(${VARIABLE}) - MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - not found") - SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + else(${VARIABLE}) + message(STATUS "Looking for C++ include ${INCLUDE} - not found") + set(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the include file ${INCLUDE} " "exists failed with the following output:\n" "${OUTPUT}\n\n") - ENDIF(${VARIABLE}) - ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") -ENDMACRO(CHECK_INCLUDE_FILE_CXX) + endif(${VARIABLE}) + endif("${VARIABLE}" MATCHES "^${VARIABLE}$") +endmacro(CHECK_INCLUDE_FILE_CXX) |