summaryrefslogtreecommitdiff
path: root/Modules/FindXMLRPC.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 13:50:14 -0400
committerBrad King <brad.king@kitware.com>2012-08-13 14:19:16 -0400
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Modules/FindXMLRPC.cmake
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadcmake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
Diffstat (limited to 'Modules/FindXMLRPC.cmake')
-rw-r--r--Modules/FindXMLRPC.cmake44
1 files changed, 22 insertions, 22 deletions
diff --git a/Modules/FindXMLRPC.cmake b/Modules/FindXMLRPC.cmake
index 0fae1d7183..6bb578b468 100644
--- a/Modules/FindXMLRPC.cmake
+++ b/Modules/FindXMLRPC.cmake
@@ -31,9 +31,9 @@ find_program(XMLRPC_C_CONFIG NAMES xmlrpc-c-config)
# Check whether we found anything.
if(XMLRPC_C_CONFIG)
set(XMLRPC_FOUND 1)
-else(XMLRPC_C_CONFIG)
+else()
set(XMLRPC_FOUND 0)
-endif(XMLRPC_C_CONFIG)
+endif()
# Lookup the include directories needed for the components requested.
if(XMLRPC_FOUND)
@@ -45,12 +45,12 @@ if(XMLRPC_FOUND)
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT
)
- else(COMMAND EXECUTE_PROCESS)
+ else()
exec_program(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --cflags"
OUTPUT_VARIABLE XMLRPC_C_CONFIG_CFLAGS
RETURN_VALUE XMLRPC_C_CONFIG_RESULT
)
- endif(COMMAND EXECUTE_PROCESS)
+ endif()
# Parse the include flags.
if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
@@ -65,13 +65,13 @@ if(XMLRPC_FOUND)
string(REGEX REPLACE "^-I" "" DIR "${flag}")
file(TO_CMAKE_PATH "${DIR}" DIR)
set(XMLRPC_INCLUDE_DIRS ${XMLRPC_INCLUDE_DIRS} "${DIR}")
- endif("${flag}" MATCHES "^-I")
- endforeach(flag)
- else("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
+ endif()
+ endforeach()
+ else()
message("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]")
set(XMLRPC_FOUND 0)
- endif("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
-endif(XMLRPC_FOUND)
+ endif()
+endif()
# Lookup the libraries needed for the components requested.
if(XMLRPC_FOUND)
@@ -83,12 +83,12 @@ if(XMLRPC_FOUND)
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT
)
- else(COMMAND EXECUTE_PROCESS)
+ else()
exec_program(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --libs"
OUTPUT_VARIABLE XMLRPC_C_CONFIG_LIBS
RETURN_VALUE XMLRPC_C_CONFIG_RESULT
)
- endif(COMMAND EXECUTE_PROCESS)
+ endif()
# Parse the library names and directories.
if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
@@ -106,8 +106,8 @@ if(XMLRPC_FOUND)
elseif("${flag}" MATCHES "^-l")
string(REGEX REPLACE "^-l" "" NAME "${flag}")
set(XMLRPC_LIBRARY_NAMES ${XMLRPC_LIBRARY_NAMES} "${NAME}")
- endif("${flag}" MATCHES "^-L")
- endforeach(flag)
+ endif()
+ endforeach()
# Search for each library needed using the directories given.
foreach(name ${XMLRPC_LIBRARY_NAMES})
@@ -121,16 +121,16 @@ if(XMLRPC_FOUND)
# If any library is not found then the whole package is not found.
if(NOT XMLRPC_${name}_LIBRARY)
set(XMLRPC_FOUND 0)
- endif(NOT XMLRPC_${name}_LIBRARY)
+ endif()
# Build an ordered list of all the libraries needed.
set(XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES} "${XMLRPC_${name}_LIBRARY}")
- endforeach(name)
- else("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
+ endforeach()
+ else()
message("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]")
set(XMLRPC_FOUND 0)
- endif("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
-endif(XMLRPC_FOUND)
+ endif()
+endif()
# Report the results.
if(NOT XMLRPC_FOUND)
@@ -138,9 +138,9 @@ if(NOT XMLRPC_FOUND)
"XMLRPC was not found. Make sure the entries XMLRPC_* are set.")
if(NOT XMLRPC_FIND_QUIETLY)
message(STATUS "${XMLRPC_DIR_MESSAGE}")
- else(NOT XMLRPC_FIND_QUIETLY)
+ else()
if(XMLRPC_FIND_REQUIRED)
message(FATAL_ERROR "${XMLRPC_DIR_MESSAGE}")
- endif(XMLRPC_FIND_REQUIRED)
- endif(NOT XMLRPC_FIND_QUIETLY)
-endif(NOT XMLRPC_FOUND)
+ endif()
+ endif()
+endif()