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 /Tests/CMakeOnly | |
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 'Tests/CMakeOnly')
-rw-r--r-- | Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt | 50 | ||||
-rw-r--r-- | Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt | 38 |
2 files changed, 44 insertions, 44 deletions
diff --git a/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt b/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt index 1c978c1..70c186c 100644 --- a/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt +++ b/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt @@ -7,56 +7,56 @@ # If you change this test do not forget to change the CheckSymbolExists # test, too. -PROJECT(CheckCXXSymbolExists CXX) +project(CheckCXXSymbolExists CXX) -CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8 FATAL_ERROR) -SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../CheckSymbolExists") +set(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../CheckSymbolExists") -INCLUDE(CheckCXXSymbolExists) +include(CheckCXXSymbolExists) foreach(_config_type Release RelWithDebInfo MinSizeRel Debug) set(CMAKE_TRY_COMPILE_CONFIGURATION ${_config_type}) unset(CSE_RESULT_${_config_type} CACHE) - MESSAGE(STATUS "Testing configuration ${_config_type}") + message(STATUS "Testing configuration ${_config_type}") check_cxx_symbol_exists(non_existent_function_for_symbol_test "cm_cse.h" CSE_RESULT_${_config_type}) - IF (CSE_RESULT_${_config_type}) - MESSAGE(SEND_ERROR "CheckCXXSymbolExists reported a nonexistent symbol as existing in configuration ${_config_type}") - ENDIF (CSE_RESULT_${_config_type}) + if (CSE_RESULT_${_config_type}) + message(SEND_ERROR "CheckCXXSymbolExists reported a nonexistent symbol as existing in configuration ${_config_type}") + endif (CSE_RESULT_${_config_type}) endforeach() set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE}) unset(CSE_RESULT_ERRNO_CERRNO CACHE) -MESSAGE(STATUS "Checking <cerrno>") +message(STATUS "Checking <cerrno>") check_cxx_symbol_exists(errno "cerrno" CSE_RESULT_ERRNO_CERRNO) -IF (NOT CSE_RESULT_ERRNO_CERRNO) +if (NOT CSE_RESULT_ERRNO_CERRNO) unset(CSE_RESULT_ERRNO_ERRNOH CACHE) - MESSAGE(STATUS "Checking <errno.h>") + message(STATUS "Checking <errno.h>") check_cxx_symbol_exists(errno "errno.h" CSE_RESULT_ERRNO_ERRNOH) - IF (NOT CSE_RESULT_ERRNO_ERRNOH) - MESSAGE(SEND_ERROR "CheckCXXSymbolExists did not find errno in <cerrno> and <errno.h>") - ELSE (NOT CSE_RESULT_ERRNO_ERRNOH) - MESSAGE(STATUS "errno found in <errno.h>") - ENDIF (NOT CSE_RESULT_ERRNO_ERRNOH) -ELSE (NOT CSE_RESULT_ERRNO_CERRNO) - MESSAGE(STATUS "errno found in <cerrno>") -ENDIF (NOT CSE_RESULT_ERRNO_CERRNO) + if (NOT CSE_RESULT_ERRNO_ERRNOH) + message(SEND_ERROR "CheckCXXSymbolExists did not find errno in <cerrno> and <errno.h>") + else (NOT CSE_RESULT_ERRNO_ERRNOH) + message(STATUS "errno found in <errno.h>") + endif (NOT CSE_RESULT_ERRNO_ERRNOH) +else (NOT CSE_RESULT_ERRNO_CERRNO) + message(STATUS "errno found in <cerrno>") +endif (NOT CSE_RESULT_ERRNO_CERRNO) -IF (CMAKE_COMPILER_IS_GNUCXX) +if (CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") unset(CSE_RESULT_O3 CACHE) - MESSAGE(STATUS "Testing with optimization -O3") + message(STATUS "Testing with optimization -O3") check_cxx_symbol_exists(non_existent_function_for_symbol_test "cm_cse.h" CSE_RESULT_O3) - IF (CSE_RESULT_O3) - MESSAGE(SEND_ERROR "CheckCXXSymbolExists reported a nonexistent symbol as existing with optimization -O3") - ENDIF (CSE_RESULT_O3) -ENDIF (CMAKE_COMPILER_IS_GNUCXX) + if (CSE_RESULT_O3) + message(SEND_ERROR "CheckCXXSymbolExists reported a nonexistent symbol as existing with optimization -O3") + endif (CSE_RESULT_O3) +endif (CMAKE_COMPILER_IS_GNUCXX) diff --git a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt index 7c969d3..acf0d2d 100644 --- a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt +++ b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt @@ -7,24 +7,24 @@ # If you change this test do not forget to change the CheckCXXSymbolExists # test, too. -PROJECT(CheckSymbolExists C) +project(CheckSymbolExists C) -CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) +cmake_minimum_required(VERSION 2.8 FATAL_ERROR) -SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}") +set(CMAKE_REQUIRED_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}") -INCLUDE(CheckSymbolExists) +include(CheckSymbolExists) foreach(_config_type Release RelWithDebInfo MinSizeRel Debug) set(CMAKE_TRY_COMPILE_CONFIGURATION ${_config_type}) unset(CSE_RESULT_${_config_type} CACHE) - MESSAGE(STATUS "Testing configuration ${_config_type}") + message(STATUS "Testing configuration ${_config_type}") check_symbol_exists(non_existent_function_for_symbol_test "cm_cse.h" CSE_RESULT_${_config_type}) - IF (CSE_RESULT_${_config_type}) - MESSAGE(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing in configuration ${_config_type}") - ENDIF (CSE_RESULT_${_config_type}) + if (CSE_RESULT_${_config_type}) + message(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing in configuration ${_config_type}") + endif (CSE_RESULT_${_config_type}) endforeach() set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE}) @@ -32,20 +32,20 @@ unset(CSE_RESULT_ERRNO CACHE) check_symbol_exists(errno "errno.h" CSE_RESULT_ERRNO) -IF (NOT CSE_RESULT_ERRNO) - MESSAGE(SEND_ERROR "CheckSymbolExists did not find errno in <errno.h>") -ELSE (NOT CSE_RESULT_ERRNO) - MESSAGE(STATUS "errno found as expected") -ENDIF (NOT CSE_RESULT_ERRNO) +if (NOT CSE_RESULT_ERRNO) + message(SEND_ERROR "CheckSymbolExists did not find errno in <errno.h>") +else (NOT CSE_RESULT_ERRNO) + message(STATUS "errno found as expected") +endif (NOT CSE_RESULT_ERRNO) -IF (CMAKE_COMPILER_IS_GNUCC) +if (CMAKE_COMPILER_IS_GNUCC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") unset(CSE_RESULT_O3 CACHE) - MESSAGE(STATUS "Testing with optimization -O3") + message(STATUS "Testing with optimization -O3") check_symbol_exists(non_existent_function_for_symbol_test "cm_cse.h" CSE_RESULT_O3) - IF (CSE_RESULT_O3) - MESSAGE(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing with optimization -O3") - ENDIF (CSE_RESULT_O3) -ENDIF (CMAKE_COMPILER_IS_GNUCC) + if (CSE_RESULT_O3) + message(SEND_ERROR "CheckSymbolExists reported a nonexistent symbol as existing with optimization -O3") + endif (CSE_RESULT_O3) +endif (CMAKE_COMPILER_IS_GNUCC) |