diff options
Diffstat (limited to 'Utilities/Release/release_cmake.cmake')
-rw-r--r-- | Utilities/Release/release_cmake.cmake | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 04ec2e5e6d..f351ac8c09 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -3,31 +3,31 @@ get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH) # default to self extracting tgz, tgz, and tar.Z if(NOT DEFINED CPACK_BINARY_GENERATORS) set(CPACK_BINARY_GENERATORS "STGZ TGZ TZ") -endif(NOT DEFINED CPACK_BINARY_GENERATORS) +endif() if(DEFINED EXTRA_COPY) set(HAS_EXTRA_COPY 1) -endif(DEFINED EXTRA_COPY) +endif() if(NOT DEFINED CMAKE_RELEASE_DIRECTORY) set(CMAKE_RELEASE_DIRECTORY "~/CMakeReleaseDirectory") -endif(NOT DEFINED CMAKE_RELEASE_DIRECTORY) +endif() if(NOT DEFINED SCRIPT_NAME) set(SCRIPT_NAME "${HOST}") -endif(NOT DEFINED SCRIPT_NAME) +endif() if(NOT DEFINED MAKE_PROGRAM) message(FATAL_ERROR "MAKE_PROGRAM must be set") -endif(NOT DEFINED MAKE_PROGRAM) +endif() if(NOT DEFINED MAKE) set(MAKE "${MAKE_PROGRAM}") -endif(NOT DEFINED MAKE) +endif() if(NOT DEFINED RUN_SHELL) set(RUN_SHELL "/bin/sh") -endif(NOT DEFINED RUN_SHELL) +endif() if(NOT DEFINED PROCESSORS) set(PROCESSORS 1) -endif(NOT DEFINED PROCESSORS) +endif() if(NOT DEFINED CMAKE_CREATE_VERSION) message(FATAL_ERROR "CMAKE_CREATE_VERSION not defined") -endif(NOT DEFINED CMAKE_CREATE_VERSION) +endif() if(NOT DEFINED GIT_COMMAND) set(GIT_COMMAND git) endif() @@ -40,14 +40,14 @@ endif() if(NOT DEFINED FINAL_PATH ) set(FINAL_PATH ${CMAKE_RELEASE_DIRECTORY}/${CMAKE_CREATE_VERSION}-build) -endif(NOT DEFINED FINAL_PATH ) +endif() if(NOT HOST) message(FATAL_ERROR "HOST must be specified with -DHOST=host") -endif(NOT HOST) +endif() if(NOT DEFINED MAKE) message(FATAL_ERROR "MAKE must be specified with -DMAKE=\"make -j2\"") -endif(NOT DEFINED MAKE) +endif() message("Creating CMake release ${CMAKE_CREATE_VERSION} on ${HOST} with parallel = ${PROCESSORS}") @@ -57,14 +57,14 @@ macro(remote_command comment command) if(${ARGC} GREATER 2) message("ssh ${HOST} ${EXTRA_HOP} ${command}") execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2}) - else(${ARGC} GREATER 2) + else() message("ssh ${HOST} ${EXTRA_HOP} ${command}") execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result) - endif(${ARGC} GREATER 2) + endif() if(${result} GREATER 0) message(FATAL_ERROR "Error running command: ${command}, return value = ${result}") - endif(${result} GREATER 0) -endmacro(remote_command) + endif() +endmacro() # set this so configure file will work from script mode # create the script specific for the given host @@ -75,10 +75,10 @@ configure_file(${SCRIPT_PATH}/release_cmake.sh.in ${SCRIPT_FILE} @ONLY) # then using the script file as input to the shell if(RUN_LOCAL) message(FATAL_ERROR "run this command: ${RUN_SHELL} ${SCRIPT_FILE}") -else(RUN_LOCAL) +else() remote_command("run release_cmake-${HOST}.sh on server" "${RUN_SHELL}" ${SCRIPT_FILE}) -endif(RUN_LOCAL) +endif() # now figure out which types of packages were created set(generators ${CPACK_BINARY_GENERATORS} ${CPACK_SOURCE_GENERATORS}) @@ -86,30 +86,30 @@ separate_arguments(generators) foreach(gen ${generators}) if("${gen}" STREQUAL "TGZ") set(SUFFIXES ${SUFFIXES} "*.tar.gz") - endif("${gen}" STREQUAL "TGZ") + endif() if("${gen}" STREQUAL "STGZ") set(SUFFIXES ${SUFFIXES} "*.sh") - endif("${gen}" STREQUAL "STGZ") + endif() if("${gen}" STREQUAL "PackageMaker") set(SUFFIXES ${SUFFIXES} "*.dmg") - endif("${gen}" STREQUAL "PackageMaker") + endif() if("${gen}" STREQUAL "TBZ2") set(SUFFIXES ${SUFFIXES} "*.tar.bz2") - endif("${gen}" STREQUAL "TBZ2") + endif() if("${gen}" MATCHES "Cygwin") set(SUFFIXES ${SUFFIXES} "*.tar.bz2") set(extra_files setup.hint) - endif("${gen}" MATCHES "Cygwin") + endif() if("${gen}" STREQUAL "TZ") set(SUFFIXES ${SUFFIXES} "*.tar.Z") - endif("${gen}" STREQUAL "TZ") + endif() if("${gen}" STREQUAL "ZIP") set(SUFFIXES ${SUFFIXES} "*.zip") - endif("${gen}" STREQUAL "ZIP") + endif() if("${gen}" STREQUAL "NSIS") set(SUFFIXES ${SUFFIXES} "*.exe") - endif("${gen}" STREQUAL "NSIS") -endforeach(gen) + endif() +endforeach() # copy all the files over from the remote machine set(PROJECT_PREFIX cmake-) foreach(suffix ${SUFFIXES}) @@ -119,8 +119,8 @@ foreach(suffix ${SUFFIXES}) RESULT_VARIABLE result) if(${result} GREATER 0) message("error getting file back scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .") - endif(${result} GREATER 0) -endforeach(suffix) + endif() +endforeach() # if there are extra files to copy get them as well if(extra_files) @@ -131,6 +131,6 @@ if(extra_files) RESULT_VARIABLE result) if(${result} GREATER 0) message("error getting file back scp ${HOST}:${FINAL_PATH}/${f} .") - endif(${result} GREATER 0) - endforeach(f) -endif(extra_files) + endif() + endforeach() +endif() |