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/FindCABLE.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/FindCABLE.cmake')
-rw-r--r-- | Modules/FindCABLE.cmake | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/Modules/FindCABLE.cmake b/Modules/FindCABLE.cmake index 678fb07..72a8805 100644 --- a/Modules/FindCABLE.cmake +++ b/Modules/FindCABLE.cmake @@ -23,12 +23,12 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) -IF(NOT CABLE) - FIND_PATH(CABLE_BUILD_DIR cableVersion.h) -ENDIF(NOT CABLE) +if(NOT CABLE) + find_path(CABLE_BUILD_DIR cableVersion.h) +endif(NOT CABLE) -IF(CABLE_BUILD_DIR) - LOAD_CACHE(${CABLE_BUILD_DIR} +if(CABLE_BUILD_DIR) + load_cache(${CABLE_BUILD_DIR} EXCLUDE BUILD_SHARED_LIBS LIBRARY_OUTPUT_PATH @@ -39,43 +39,43 @@ IF(CABLE_BUILD_DIR) CABLE_LIBRARY_PATH CABLE_EXECUTABLE_PATH) - IF(CABLE_LIBRARY_PATH) - FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS + if(CABLE_LIBRARY_PATH) + find_library(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS ${CABLE_LIBRARY_PATH} ${CABLE_LIBRARY_PATH}/*) - ELSE(CABLE_LIBRARY_PATH) - FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS + else(CABLE_LIBRARY_PATH) + find_library(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS ${CABLE_BINARY_DIR}/CableTclFacility ${CABLE_BINARY_DIR}/CableTclFacility/*) - ENDIF(CABLE_LIBRARY_PATH) + endif(CABLE_LIBRARY_PATH) - IF(CABLE_EXECUTABLE_PATH) - FIND_PROGRAM(CABLE NAMES cable PATHS + if(CABLE_EXECUTABLE_PATH) + find_program(CABLE NAMES cable PATHS ${CABLE_EXECUTABLE_PATH} ${CABLE_EXECUTABLE_PATH}/*) - ELSE(CABLE_EXECUTABLE_PATH) - FIND_PROGRAM(CABLE NAMES cable PATHS + else(CABLE_EXECUTABLE_PATH) + find_program(CABLE NAMES cable PATHS ${CABLE_BINARY_DIR}/Executables ${CABLE_BINARY_DIR}/Executables/*) - ENDIF(CABLE_EXECUTABLE_PATH) + endif(CABLE_EXECUTABLE_PATH) - FIND_PATH(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h + find_path(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h ${CABLE_SOURCE_DIR}) -ELSE(CABLE_BUILD_DIR) +else(CABLE_BUILD_DIR) # Find the cable executable in the path. - FIND_PROGRAM(CABLE NAMES cable) + find_program(CABLE NAMES cable) # Get the path where the executable sits, but without the executable # name on it. - GET_FILENAME_COMPONENT(CABLE_ROOT_BIN ${CABLE} PATH) + get_filename_component(CABLE_ROOT_BIN ${CABLE} PATH) # Find the cable include directory in a path relative to the cable # executable. - FIND_PATH(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h + find_path(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h ${CABLE_ROOT_BIN}/../include/Cable) # Find the WrapTclFacility library in a path relative to the cable # executable. - FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS + find_library(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS ${CABLE_ROOT_BIN}/../lib/Cable) -ENDIF(CABLE_BUILD_DIR) +endif(CABLE_BUILD_DIR) |