Utilities/Release: Add optional remote launcher to ssh calls
This commit is contained in:
parent
a53e0168c3
commit
a95b47154e
|
@ -19,6 +19,9 @@ endif()
|
||||||
if(NOT DEFINED RUN_SHELL)
|
if(NOT DEFINED RUN_SHELL)
|
||||||
set(RUN_SHELL "/bin/sh")
|
set(RUN_SHELL "/bin/sh")
|
||||||
endif()
|
endif()
|
||||||
|
if(NOT DEFINED RUN_LAUNCHER)
|
||||||
|
set(RUN_LAUNCHER "")
|
||||||
|
endif()
|
||||||
if(NOT DEFINED PROCESSORS)
|
if(NOT DEFINED PROCESSORS)
|
||||||
set(PROCESSORS 1)
|
set(PROCESSORS 1)
|
||||||
endif()
|
endif()
|
||||||
|
@ -52,11 +55,11 @@ message("Creating CMake release ${CMAKE_CREATE_VERSION} on ${HOST} with parallel
|
||||||
macro(remote_command comment command)
|
macro(remote_command comment command)
|
||||||
message("${comment}")
|
message("${comment}")
|
||||||
if(${ARGC} GREATER 2)
|
if(${ARGC} GREATER 2)
|
||||||
message("ssh ${HOST} ${command}")
|
message("ssh ${HOST} ${RUN_LAUNCHER} ${command}")
|
||||||
execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2})
|
execute_process(COMMAND ssh ${HOST} ${RUN_LAUNCHER} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2})
|
||||||
else()
|
else()
|
||||||
message("ssh ${HOST} ${command}")
|
message("ssh ${HOST} ${RUN_LAUNCHER} ${command}")
|
||||||
execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result)
|
execute_process(COMMAND ssh ${HOST} ${RUN_LAUNCHER} ${command} RESULT_VARIABLE result)
|
||||||
endif()
|
endif()
|
||||||
if(${result} GREATER 0)
|
if(${result} GREATER 0)
|
||||||
message(FATAL_ERROR "Error running command: ${command}, return value = ${result}")
|
message(FATAL_ERROR "Error running command: ${command}, return value = ${result}")
|
||||||
|
|
Loading…
Reference in New Issue