summaryrefslogtreecommitdiffstats
path: root/Modules/FindPackageMessage.cmake
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 /Modules/FindPackageMessage.cmake
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 'Modules/FindPackageMessage.cmake')
-rw-r--r--Modules/FindPackageMessage.cmake26
1 files changed, 13 insertions, 13 deletions
diff --git a/Modules/FindPackageMessage.cmake b/Modules/FindPackageMessage.cmake
index 48d3472..f78792d 100644
--- a/Modules/FindPackageMessage.cmake
+++ b/Modules/FindPackageMessage.cmake
@@ -11,12 +11,12 @@
#
# Example:
#
-# IF(X11_FOUND)
+# if(X11_FOUND)
# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
-# ELSE(X11_FOUND)
+# else(X11_FOUND)
# ...
-# ENDIF(X11_FOUND)
+# endif(X11_FOUND)
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
@@ -31,19 +31,19 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FUNCTION(FIND_PACKAGE_MESSAGE pkg msg details)
+function(FIND_PACKAGE_MESSAGE pkg msg details)
# Avoid printing a message repeatedly for the same find result.
- IF(NOT ${pkg}_FIND_QUIETLY)
- STRING(REGEX REPLACE "[\n]" "" details "${details}")
- SET(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
- IF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
+ if(NOT ${pkg}_FIND_QUIETLY)
+ string(REGEX REPLACE "[\n]" "" details "${details}")
+ set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
+ if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
# The message has not yet been printed.
- MESSAGE(STATUS "${msg}")
+ message(STATUS "${msg}")
# Save the find details in the cache to avoid printing the same
# message again.
- SET("${DETAILS_VAR}" "${details}"
+ set("${DETAILS_VAR}" "${details}"
CACHE INTERNAL "Details about finding ${pkg}")
- ENDIF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
- ENDIF(NOT ${pkg}_FIND_QUIETLY)
-ENDFUNCTION(FIND_PACKAGE_MESSAGE)
+ endif(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
+ endif(NOT ${pkg}_FIND_QUIETLY)
+endfunction(FIND_PACKAGE_MESSAGE)