Commit b1aa8a47 authored by Brad King's avatar Brad King
Browse files

FindXMLRPC: Drop unnecessary exec_program code paths

We always have `execute_process` now, so drop our ancient `exec_program`
code paths that are never used anymore.
parent a91eb5e4
...@@ -43,20 +43,12 @@ endif() ...@@ -43,20 +43,12 @@ endif()
# Lookup the include directories needed for the components requested. # Lookup the include directories needed for the components requested.
if(XMLRPC_C_FOUND) if(XMLRPC_C_FOUND)
# Use the newer EXECUTE_PROCESS command if it is available. execute_process(
if(COMMAND EXECUTE_PROCESS) COMMAND ${XMLRPC_C_CONFIG} ${XMLRPC_FIND_COMPONENTS} --cflags
execute_process( OUTPUT_VARIABLE XMLRPC_C_CONFIG_CFLAGS
COMMAND ${XMLRPC_C_CONFIG} ${XMLRPC_FIND_COMPONENTS} --cflags OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE XMLRPC_C_CONFIG_CFLAGS RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE )
RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT
)
else()
exec_program(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --cflags"
OUTPUT_VARIABLE XMLRPC_C_CONFIG_CFLAGS
RETURN_VALUE XMLRPC_C_CONFIG_RESULT
)
endif()
# Parse the include flags. # Parse the include flags.
if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0") if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0")
...@@ -80,20 +72,12 @@ endif() ...@@ -80,20 +72,12 @@ endif()
# Lookup the libraries needed for the components requested. # Lookup the libraries needed for the components requested.
if(XMLRPC_C_FOUND) if(XMLRPC_C_FOUND)
# Use the newer EXECUTE_PROCESS command if it is available. execute_process(
if(COMMAND EXECUTE_PROCESS) COMMAND ${XMLRPC_C_CONFIG} ${XMLRPC_FIND_COMPONENTS} --libs
execute_process( OUTPUT_VARIABLE XMLRPC_C_CONFIG_LIBS
COMMAND ${XMLRPC_C_CONFIG} ${XMLRPC_FIND_COMPONENTS} --libs OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE XMLRPC_C_CONFIG_LIBS RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE )
RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT
)
else()
exec_program(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --libs"
OUTPUT_VARIABLE XMLRPC_C_CONFIG_LIBS
RETURN_VALUE XMLRPC_C_CONFIG_RESULT
)
endif()
# Parse the library names and directories. # Parse the library names and directories.
if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0") if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment