summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:47:32 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit77543bde41b0e52c3959016698b529835945d62d (patch)
treeff63e5fbec326c4a5d821e7496c6d2cb52f75b92 /Utilities
parent7bbaa4283de26864b2e55e819db0884771585467 (diff)
downloadCMake-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 'Utilities')
-rw-r--r--Utilities/CMakeLists.txt60
-rw-r--r--Utilities/Doxygen/CMakeLists.txt18
-rw-r--r--Utilities/KWIML/CMakeLists.txt8
-rw-r--r--Utilities/KWStyle/CMakeLists.txt60
-rw-r--r--Utilities/Release/Cygwin/CMakeLists.txt36
-rw-r--r--Utilities/Release/release_cmake.cmake6
6 files changed, 94 insertions, 94 deletions
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index 8a52e22..98c1cfd 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -9,14 +9,14 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
-SUBDIRS(Doxygen KWStyle)
+subdirs(Doxygen KWStyle)
-MAKE_DIRECTORY(${CMake_BINARY_DIR}/Docs)
+make_directory(${CMake_BINARY_DIR}/Docs)
# Add a documentation target.
-SET(DOC_FILES "")
+set(DOC_FILES "")
-SET(MAN_FILES
+set(MAN_FILES
${CMake_BINARY_DIR}/Docs/cmake.1
${CMake_BINARY_DIR}/Docs/cmakecommands.1
${CMake_BINARY_DIR}/Docs/cmakecompat.1
@@ -25,7 +25,7 @@ SET(MAN_FILES
${CMake_BINARY_DIR}/Docs/cmakevars.1
${CMake_BINARY_DIR}/Docs/cmakemodules.1
)
-SET(TEXT_FILES
+set(TEXT_FILES
${CMake_BINARY_DIR}/Docs/cmake.txt
${CMake_BINARY_DIR}/Docs/cmake.docbook
${CMake_BINARY_DIR}/Docs/cmake-policies.txt
@@ -35,7 +35,7 @@ SET(TEXT_FILES
${CMake_BINARY_DIR}/Docs/cmake-commands.txt
${CMake_BINARY_DIR}/Docs/cmake-compatcommands.txt
)
-SET(HTML_FILES
+set(HTML_FILES
${CMake_BINARY_DIR}/Docs/cmake.html
${CMake_BINARY_DIR}/Docs/cmake-policies.html
${CMake_BINARY_DIR}/Docs/cmake-properties.html
@@ -45,12 +45,12 @@ SET(HTML_FILES
${CMake_BINARY_DIR}/Docs/cmake-compatcommands.html
)
-MACRO(ADD_DOCS target dependency)
+macro(ADD_DOCS target dependency)
# Generate documentation for "ctest" executable.
- GET_TARGET_PROPERTY(CMD ${target} LOCATION)
+ get_target_property(CMD ${target} LOCATION)
# only generate the documentation if the target is actually built
- IF(CMD)
- ADD_CUSTOM_COMMAND(
+ if(CMD)
+ add_custom_command(
OUTPUT ${CMake_BINARY_DIR}/Docs/${target}.txt
${${target}-PATH} # Possibly set PATH, see below.
COMMAND ${CMD}
@@ -61,27 +61,27 @@ MACRO(ADD_DOCS target dependency)
DEPENDS ${target}
MAIN_DEPENDENCY ${dependency}
)
- SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/${target}.txt)
- LIST(APPEND MAN_FILES ${CMake_BINARY_DIR}/Docs/${target}.1)
- LIST(APPEND TEXT_FILES
+ set(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/${target}.txt)
+ list(APPEND MAN_FILES ${CMake_BINARY_DIR}/Docs/${target}.1)
+ list(APPEND TEXT_FILES
${CMake_BINARY_DIR}/Docs/${target}.txt
${CMake_BINARY_DIR}/Docs/${target}.docbook
)
- LIST(APPEND HTML_FILES ${CMake_BINARY_DIR}/Docs/${target}.html)
- ENDIF(CMD)
-ENDMACRO(ADD_DOCS target dependency)
+ list(APPEND HTML_FILES ${CMake_BINARY_DIR}/Docs/${target}.html)
+ endif(CMD)
+endmacro(ADD_DOCS target dependency)
# Help cmake-gui find the Qt DLLs on Windows.
-SET(WIN_SHELL_GENS "Visual Studio|NMake|MinGW|Watcom|Borland")
-IF(BUILD_QtDialog AND "${CMAKE_GENERATOR}" MATCHES "${WIN_SHELL_GENS}"
+set(WIN_SHELL_GENS "Visual Studio|NMake|MinGW|Watcom|Borland")
+if(BUILD_QtDialog AND "${CMAKE_GENERATOR}" MATCHES "${WIN_SHELL_GENS}"
AND EXISTS "${QT_QMAKE_EXECUTABLE}" AND NOT CMAKE_NO_AUTO_QT_ENV)
- GET_FILENAME_COMPONENT(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH)
- IF(EXISTS "${Qt_BIN_DIR}/QtCore4.dll")
+ get_filename_component(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH)
+ if(EXISTS "${Qt_BIN_DIR}/QtCore4.dll")
# Tell the macro to set the path before running cmake-gui.
- STRING(REPLACE ";" "\\;" _PATH "PATH=${Qt_BIN_DIR};%PATH%")
- SET(cmake-gui-PATH COMMAND set "${_PATH}")
- ENDIF(EXISTS "${Qt_BIN_DIR}/QtCore4.dll")
-ENDIF(BUILD_QtDialog AND "${CMAKE_GENERATOR}" MATCHES "${WIN_SHELL_GENS}"
+ string(REPLACE ";" "\\;" _PATH "PATH=${Qt_BIN_DIR};%PATH%")
+ set(cmake-gui-PATH COMMAND set "${_PATH}")
+ endif(EXISTS "${Qt_BIN_DIR}/QtCore4.dll")
+endif(BUILD_QtDialog AND "${CMAKE_GENERATOR}" MATCHES "${WIN_SHELL_GENS}"
AND EXISTS "${QT_QMAKE_EXECUTABLE}" AND NOT CMAKE_NO_AUTO_QT_ENV)
# add the docs for the executables
@@ -93,8 +93,8 @@ ADD_DOCS(cmake-gui ${CMake_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in)
# add the documentation for cmake itself
-GET_TARGET_PROPERTY(CMD cmake LOCATION)
-ADD_CUSTOM_COMMAND(
+get_target_property(CMD cmake LOCATION)
+add_custom_command(
OUTPUT ${CMake_BINARY_DIR}/Docs/cmake.txt
COMMAND ${CMD}
ARGS --copyright ${CMake_BINARY_DIR}/Docs/Copyright.txt
@@ -124,12 +124,12 @@ ADD_CUSTOM_COMMAND(
MAIN_DEPENDENCY ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt
)
-INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES ${MAN_FILES})
-INSTALL_FILES(${CMAKE_DOC_DIR} FILES ${HTML_FILES} ${TEXT_FILES})
-INSTALL(FILES cmake.m4 DESTINATION share/aclocal)
+install_files(${CMAKE_MAN_DIR}/man1 FILES ${MAN_FILES})
+install_files(${CMAKE_DOC_DIR} FILES ${HTML_FILES} ${TEXT_FILES})
+install(FILES cmake.m4 DESTINATION share/aclocal)
# Drive documentation generation.
-ADD_CUSTOM_TARGET(documentation ALL DEPENDS ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/cmake.txt )
+add_custom_target(documentation ALL DEPENDS ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/cmake.txt )
# Documentation testing.
if(BUILD_TESTING)
diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index 2430391..ab40fdf 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -13,27 +13,27 @@
#
# Build the documentation
#
-INCLUDE (${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
+include (${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
-IF (BUILD_DOCUMENTATION)
+if (BUILD_DOCUMENTATION)
#
# Configure the script and the doxyfile, then add target
#
- IF(NOT DOT_PATH)
- GET_FILENAME_COMPONENT(DOT_PATH ${DOT} PATH)
- ENDIF(NOT DOT_PATH)
+ if(NOT DOT_PATH)
+ get_filename_component(DOT_PATH ${DOT} PATH)
+ endif(NOT DOT_PATH)
- CONFIGURE_FILE(
+ configure_file(
${CMake_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in
${CMake_BINARY_DIR}/Utilities/Doxygen/doxyfile)
- CONFIGURE_FILE(
+ configure_file(
${CMake_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.sh.in
${CMake_BINARY_DIR}/Utilities/Doxygen/doc_makeall.sh)
- ADD_CUSTOM_TARGET(DoxygenDoc
+ add_custom_target(DoxygenDoc
${BASH}
${CMake_BINARY_DIR}/Utilities/Doxygen/doc_makeall.sh)
-ENDIF (BUILD_DOCUMENTATION)
+endif (BUILD_DOCUMENTATION)
diff --git a/Utilities/KWIML/CMakeLists.txt b/Utilities/KWIML/CMakeLists.txt
index 6a8641a..62b6fff 100644
--- a/Utilities/KWIML/CMakeLists.txt
+++ b/Utilities/KWIML/CMakeLists.txt
@@ -13,8 +13,8 @@
# Import the KWIML directory tree into a subdirectory under a parent
# project and configure the library as follows:
#
-# SET(KWIML myIML)
-# SUBDIRS(KWIML)
+# set(KWIML myIML)
+# subdirs(KWIML)
#
# Optional settings are as follows:
#
@@ -22,8 +22,8 @@
# Headers will go in a directory called "${KWIML}" under this root.
# For example:
#
-# SET(KWIML_HEADER_ROOT ${PROJECT_BINARY_DIR})
-# INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
+# set(KWIML_HEADER_ROOT ${PROJECT_BINARY_DIR})
+# include_directories(${PROJECT_BINARY_DIR})
#
# KWIML_INSTALL_INCLUDE_DIR = install KWIML with "make install"
# Specify a value relative to the install prefix and do NOT start with '/'.
diff --git a/Utilities/KWStyle/CMakeLists.txt b/Utilities/KWStyle/CMakeLists.txt
index fbaa67b..b08dbde 100644
--- a/Utilities/KWStyle/CMakeLists.txt
+++ b/Utilities/KWStyle/CMakeLists.txt
@@ -16,63 +16,63 @@
# Search for a built-from-source KWStyle under Dashboards/Support on a typical
# dashboard machines:
#
-SET(home "$ENV{HOME}")
-IF(NOT home)
- STRING(REPLACE "\\" "/" home "$ENV{USERPROFILE}")
-ENDIF()
+set(home "$ENV{HOME}")
+if(NOT home)
+ string(REPLACE "\\" "/" home "$ENV{USERPROFILE}")
+endif()
-FIND_PROGRAM(KWSTYLE_EXECUTABLE
+find_program(KWSTYLE_EXECUTABLE
NAMES KWStyle
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware Inc.\\KWStyle 1.0.0]/bin"
"${home}/Dashboards/Support/KWStyle/bin"
)
-MARK_AS_ADVANCED(KWSTYLE_EXECUTABLE)
+mark_as_advanced(KWSTYLE_EXECUTABLE)
-SET(CMAKE_USE_KWSTYLE_DEFAULT OFF)
-IF(KWSTYLE_EXECUTABLE)
- SET(CMAKE_USE_KWSTYLE_DEFAULT ON)
-ENDIF()
+set(CMAKE_USE_KWSTYLE_DEFAULT OFF)
+if(KWSTYLE_EXECUTABLE)
+ set(CMAKE_USE_KWSTYLE_DEFAULT ON)
+endif()
-OPTION(CMAKE_USE_KWSTYLE
+option(CMAKE_USE_KWSTYLE
"Add StyleCheck target and KWStyle test: run KWStyle to check for coding standard violations."
${CMAKE_USE_KWSTYLE_DEFAULT})
-MARK_AS_ADVANCED(CMAKE_USE_KWSTYLE)
+mark_as_advanced(CMAKE_USE_KWSTYLE)
-IF(CMAKE_USE_KWSTYLE)
- OPTION(KWSTYLE_USE_VIM_FORMAT "Set KWStyle to generate errors with a VIM-compatible format." OFF)
- OPTION(KWSTYLE_USE_MSVC_FORMAT "Set KWStyle to generate errors with a VisualStudio-compatible format." OFF)
- MARK_AS_ADVANCED(KWSTYLE_USE_VIM_FORMAT)
- MARK_AS_ADVANCED(KWSTYLE_USE_MSVC_FORMAT)
+if(CMAKE_USE_KWSTYLE)
+ option(KWSTYLE_USE_VIM_FORMAT "Set KWStyle to generate errors with a VIM-compatible format." OFF)
+ option(KWSTYLE_USE_MSVC_FORMAT "Set KWStyle to generate errors with a VisualStudio-compatible format." OFF)
+ mark_as_advanced(KWSTYLE_USE_VIM_FORMAT)
+ mark_as_advanced(KWSTYLE_USE_MSVC_FORMAT)
- IF(KWSTYLE_USE_VIM_FORMAT)
- SET(KWSTYLE_ARGUMENTS -vim ${KWSTYLE_ARGUMENTS})
- ENDIF(KWSTYLE_USE_VIM_FORMAT)
+ if(KWSTYLE_USE_VIM_FORMAT)
+ set(KWSTYLE_ARGUMENTS -vim ${KWSTYLE_ARGUMENTS})
+ endif(KWSTYLE_USE_VIM_FORMAT)
- IF(KWSTYLE_USE_MSVC_FORMAT)
- SET(KWSTYLE_ARGUMENTS -msvc ${KWSTYLE_ARGUMENTS})
- ENDIF(KWSTYLE_USE_MSVC_FORMAT)
+ if(KWSTYLE_USE_MSVC_FORMAT)
+ set(KWSTYLE_ARGUMENTS -msvc ${KWSTYLE_ARGUMENTS})
+ endif(KWSTYLE_USE_MSVC_FORMAT)
- CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/KWStyle/CMake.kws.xml.in
+ configure_file(${CMake_SOURCE_DIR}/Utilities/KWStyle/CMake.kws.xml.in
${CMake_BINARY_DIR}/CMake.kws.xml)
- CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in
+ configure_file(${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeMoreChecks.kws.xml.in
${CMake_BINARY_DIR}/CMakeMoreChecks.kws.xml)
- CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeFiles.txt.in
+ configure_file(${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeFiles.txt.in
${CMake_BINARY_DIR}/CMakeKWSFiles.txt)
- ADD_CUSTOM_COMMAND(
+ add_custom_command(
OUTPUT ${CMake_BINARY_DIR}/KWStyleReport.txt
COMMAND ${KWSTYLE_EXECUTABLE}
ARGS -xml ${CMake_BINARY_DIR}/CMake.kws.xml -o ${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeOverwrite.txt -v ${KWSTYLE_ARGUMENTS} -D ${CMake_BINARY_DIR}/CMakeKWSFiles.txt
COMMENT "Coding Style Checker"
)
- ADD_CUSTOM_TARGET(MoreStyleChecks
+ add_custom_target(MoreStyleChecks
COMMAND ${KWSTYLE_EXECUTABLE}
-xml ${CMake_BINARY_DIR}/CMakeMoreChecks.kws.xml -html ${CMake_BINARY_DIR}/html -o ${CMake_SOURCE_DIR}/Utilities/KWStyle/CMakeOverwrite.txt -v ${KWSTYLE_ARGUMENTS} -D ${CMake_BINARY_DIR}/CMakeKWSFiles.txt
COMMENT "Coding Style Checker, more checks enabled"
)
- ADD_CUSTOM_TARGET(StyleCheck DEPENDS ${CMake_BINARY_DIR}/KWStyleReport.txt)
-ENDIF(CMAKE_USE_KWSTYLE)
+ add_custom_target(StyleCheck DEPENDS ${CMake_BINARY_DIR}/KWStyleReport.txt)
+endif(CMAKE_USE_KWSTYLE)
diff --git a/Utilities/Release/Cygwin/CMakeLists.txt b/Utilities/Release/Cygwin/CMakeLists.txt
index 565c9a4..6a45361 100644
--- a/Utilities/Release/Cygwin/CMakeLists.txt
+++ b/Utilities/Release/Cygwin/CMakeLists.txt
@@ -1,25 +1,25 @@
-FILE(GLOB INSTALLED_CURSES /usr/bin/cygncurses-*.dll)
-SET(MAX 0)
-FOREACH(f ${INSTALLED_CURSES})
- IF(NOT "${f}" MATCHES "\\+")
- STRING(REGEX REPLACE ".*-([0-9]*).dll" "\\1" NUMBER "${f}")
- IF(NUMBER GREATER MAX)
- SET(MAX ${NUMBER})
- ENDIF(NUMBER GREATER MAX)
- ENDIF(NOT "${f}" MATCHES "\\+")
-ENDFOREACH(f)
-STRING(REGEX REPLACE "/usr/bin/" "\\1" NUMBER "${f}")
-SET(CMAKE_NCURSES_VERSION "libncurses${MAX}")
-MESSAGE(STATUS "Using curses version: libncurses${MAX}")
-CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-setup.hint.in"
+file(GLOB INSTALLED_CURSES /usr/bin/cygncurses-*.dll)
+set(MAX 0)
+foreach(f ${INSTALLED_CURSES})
+ if(NOT "${f}" MATCHES "\\+")
+ string(REGEX REPLACE ".*-([0-9]*).dll" "\\1" NUMBER "${f}")
+ if(NUMBER GREATER MAX)
+ set(MAX ${NUMBER})
+ endif(NUMBER GREATER MAX)
+ endif(NOT "${f}" MATCHES "\\+")
+endforeach(f)
+string(REGEX REPLACE "/usr/bin/" "\\1" NUMBER "${f}")
+set(CMAKE_NCURSES_VERSION "libncurses${MAX}")
+message(STATUS "Using curses version: libncurses${MAX}")
+configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-setup.hint.in"
"${CMake_BINARY_DIR}/setup.hint")
-CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in"
+configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in"
"${CMake_BINARY_DIR}/Docs/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.README")
-INSTALL_FILES(/share/doc/Cygwin FILES
+install_files(/share/doc/Cygwin FILES
${CMake_BINARY_DIR}/Docs/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.README
)
-CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in"
+configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in"
${CPACK_CYGWIN_BUILD_SCRIPT})
-CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in"
+configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in"
${CPACK_CYGWIN_PATCH_FILE})
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake
index b5b86af..04ec2e5 100644
--- a/Utilities/Release/release_cmake.cmake
+++ b/Utilities/Release/release_cmake.cmake
@@ -73,12 +73,12 @@ configure_file(${SCRIPT_PATH}/release_cmake.sh.in ${SCRIPT_FILE} @ONLY)
# run the script by starting a shell on the remote machine
# then using the script file as input to the shell
-IF(RUN_LOCAL)
+if(RUN_LOCAL)
message(FATAL_ERROR "run this command: ${RUN_SHELL} ${SCRIPT_FILE}")
-ELSE(RUN_LOCAL)
+else(RUN_LOCAL)
remote_command("run release_cmake-${HOST}.sh on server"
"${RUN_SHELL}" ${SCRIPT_FILE})
-ENDIF(RUN_LOCAL)
+endif(RUN_LOCAL)
# now figure out which types of packages were created
set(generators ${CPACK_BINARY_GENERATORS} ${CPACK_SOURCE_GENERATORS})