|
@@ -33,11 +33,7 @@ message("Creating CMake release ${CMAKE_VERSION} on ${HOST} with parallel = ${PR
|
|
|
# define a macro to run a remote command
|
|
# define a macro to run a remote command
|
|
|
macro(remote_command comment command)
|
|
macro(remote_command comment command)
|
|
|
message("${comment}")
|
|
message("${comment}")
|
|
|
- if(${ARGC} GREATER 2)
|
|
|
|
|
- execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2})
|
|
|
|
|
- else(${ARGC} GREATER 2)
|
|
|
|
|
- execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result)
|
|
|
|
|
- endif(${ARGC} GREATER 2)
|
|
|
|
|
|
|
+ execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result)
|
|
|
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}")
|
|
|
endif(${result} GREATER 0)
|
|
endif(${result} GREATER 0)
|
|
@@ -46,7 +42,7 @@ endmacro(remote_command)
|
|
|
set(CMAKE_BACKWARDS_COMPATIBILITY 2.4)
|
|
set(CMAKE_BACKWARDS_COMPATIBILITY 2.4)
|
|
|
configure_file(${SCRIPT_PATH}/release_cmake.sh.in release_cmake-${HOST}.sh)
|
|
configure_file(${SCRIPT_PATH}/release_cmake.sh.in release_cmake-${HOST}.sh)
|
|
|
file(READ release_cmake-${HOST}.sh RELEASE_CMAKE_CONTENTS)
|
|
file(READ release_cmake-${HOST}.sh RELEASE_CMAKE_CONTENTS)
|
|
|
-remote_command("Copy release_cmake.sh to sever"
|
|
|
|
|
|
|
+remote_command("Copy release_cmake-${HOST}.sh to sever"
|
|
|
"echo '${RELEASE_CMAKE_CONTENTS}' > release_cmake-${HOST}.sh")
|
|
"echo '${RELEASE_CMAKE_CONTENTS}' > release_cmake-${HOST}.sh")
|
|
|
|
|
|
|
|
remote_command("Run release script" "sh release_cmake-${HOST}.sh")
|
|
remote_command("Run release script" "sh release_cmake-${HOST}.sh")
|