diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-10-30 15:39:57 -0700 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-10-30 15:39:57 -0700 |
commit | 035c7fabc3b82cbc9a346c11abe2e9462b4c0379 (patch) | |
tree | 7e40f5a790eae329a8c5d3e59f046451767956ff /Utilities/Release | |
download | cmake-035c7fabc3b82cbc9a346c11abe2e9462b4c0379.tar.gz cmake-035c7fabc3b82cbc9a346c11abe2e9462b4c0379.tar.bz2 cmake-035c7fabc3b82cbc9a346c11abe2e9462b4c0379.zip |
Imported Upstream version 2.8.9upstream/2.8.9
Diffstat (limited to 'Utilities/Release')
21 files changed, 695 insertions, 0 deletions
diff --git a/Utilities/Release/CMakeInstall.bmp b/Utilities/Release/CMakeInstall.bmp Binary files differnew file mode 100644 index 000000000..0d4c1a5e7 --- /dev/null +++ b/Utilities/Release/CMakeInstall.bmp diff --git a/Utilities/Release/CMakeLogo.ico b/Utilities/Release/CMakeLogo.ico Binary files differnew file mode 100644 index 000000000..e13bb156f --- /dev/null +++ b/Utilities/Release/CMakeLogo.ico diff --git a/Utilities/Release/Cygwin/CMakeLists.txt b/Utilities/Release/Cygwin/CMakeLists.txt new file mode 100644 index 000000000..2420c97d9 --- /dev/null +++ b/Utilities/Release/Cygwin/CMakeLists.txt @@ -0,0 +1,25 @@ +FILE(GLOB INSTALLED_CURSES /usr/bin/cygncurses-*.dll) +SET(MAX 0) +FOREACH(f ${INSTALLED_CURSES}) + IF(NOT "${f}" MATCHES "\\+") + STRING(REGEX REPLACE ".*-([0-9]*).dll" "\\1" NUMBER "${f}") + IF(NUMBER GREATER MAX) + SET(MAX ${NUMBER}) + ENDIF(NUMBER GREATER MAX) + ENDIF(NOT "${f}" MATCHES "\\+") +ENDFOREACH(f) +STRING(REGEX REPLACE "/usr/bin/" "\\1" NUMBER "${f}") +SET(CMAKE_NCURSES_VERSION "libncurses${MAX}") +MESSAGE(STATUS "Using curses version: libncurses${MAX}") +CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-setup.hint.in" + "${CMake_BINARY_DIR}/setup.hint") +CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in" + "${CMake_BINARY_DIR}/Docs/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.README") +INSTALL_FILES(/share/doc/Cygwin FILES + ${CMake_BINARY_DIR}/Docs/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.README + ) +CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in" + ${CPACK_CYGWIN_BUILD_SCRIPT}) +CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in" + ${CPACK_CYGWIN_PATCH_FILE}) + diff --git a/Utilities/Release/Cygwin/README.cygwin.in b/Utilities/Release/Cygwin/README.cygwin.in new file mode 100644 index 000000000..6c42a4c20 --- /dev/null +++ b/Utilities/Release/Cygwin/README.cygwin.in @@ -0,0 +1,42 @@ +cmake +-------------------------------------- +Runtime requirements: + cygwin-1.5.21(0.156/4/2) or newer + +Build requirements + cygwin-1.5.21(0.156/4/2) or newer + make + +Canonical homepage: + http://www.cmake.org + +Canonical download: + ftp://www.cmake.org/pub/cmake/ + +------------------------------------ + +Build instructions: + unpack @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 + if you use setup to install this src package, it will be + unpacked under /usr/src automatically + cd /usr/src + ./@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.sh all + +This will create: + /usr/src/@CPACK_PACKAGE_FILE_NAME@.tar.bz2 + /usr/src/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 + +------------------------------------------- + +Port Notes: + +The directory /usr/share/@CPACK_PACKAGE_FILE_NAME@/include is purposely not +located at /usr/include/@CPACK_PACKAGE_FILE_NAME@ or /usr/include/cmake. The +files it contains are not meant for inclusion in any C or C++ program. +They are used for compiling dynamically loadable CMake commands inside +projects that provide them. CMake will automatically provide the +proper include path when the files are needed. + +------------------ + +Cygwin port maintained by: CMake Developers <cmake@www.cmake.org> diff --git a/Utilities/Release/Cygwin/cygwin-package.sh.in b/Utilities/Release/Cygwin/cygwin-package.sh.in new file mode 100755 index 000000000..9730b3332 --- /dev/null +++ b/Utilities/Release/Cygwin/cygwin-package.sh.in @@ -0,0 +1,90 @@ +TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd` + +# create build directory +mkdirs() +{ + ( + mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" + ) +} + +# cd into +# untar source tree and apply patch +prep() +{ + ( + cd "$TOP_DIR" && + tar xvfj @CPACK_PACKAGE_FILE_NAME@.tar.bz2 + patch -p0 < "@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch" && + mkdirs + ) +} + +conf() +{ + ( + cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && + ../bootstrap --parallel=2 + ) +} + +build() +{ + ( + cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && + make -j2 && + make test + ) +} + +clean() +{ + ( + cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && + make clean + ) +} + +pkg() +{ + ( + cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && + ./bin/cpack && + mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.tar.bz2 "$TOP_DIR" + ) +} + +spkg() +{ + ( + cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" && + ./bin/cpack --config CPackSourceConfig.cmake && + mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 "$TOP_DIR" + ) +} + +finish() +{ + ( + rm -rf "@CPACK_PACKAGE_FILE_NAME@" + ) +} + +case $1 in + prep) prep ; STATUS=$? ;; + mkdirs) mkdirs ; STATUS=$? ;; + conf) conf ; STATUS=$? ;; + build) build ; STATUS=$? ;; + clean) clean ; STATUS=$? ;; + package) pkg ; STATUS=$? ;; + pkg) pkg ; STATUS=$? ;; + src-package) spkg ; STATUS=$? ;; + spkg) spkg ; STATUS=$? ;; + finish) finish ; STATUS=$? ;; + all) ( + prep && conf && build && pkg && spkg && finish ; + STATUS=$? + ) ;; + *) echo "Error: bad argument (all or one of these: prep mkdirs conf build clean package pkg src-package spkg finish)" ; exit 1 ;; +esac +exit ${STATUS} diff --git a/Utilities/Release/Cygwin/cygwin-patch.diff.in b/Utilities/Release/Cygwin/cygwin-patch.diff.in new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/Utilities/Release/Cygwin/cygwin-patch.diff.in diff --git a/Utilities/Release/Cygwin/cygwin-setup.hint.in b/Utilities/Release/Cygwin/cygwin-setup.hint.in new file mode 100644 index 000000000..a2532fc68 --- /dev/null +++ b/Utilities/Release/Cygwin/cygwin-setup.hint.in @@ -0,0 +1,5 @@ +# CMake setup.hint file for cygwin setup.exe program +category: Devel +requires: libgcc1 libidn11 @CMAKE_NCURSES_VERSION@ libstdc++6 +sdesc: "A cross platform build manager" +ldesc: "CMake is a cross platform build manager. It allows you to specify build parameters for C and C++ programs in a cross platform manner. For cygwin Makefiles will be generated. CMake is also capable of generating microsoft project files, nmake, and borland makefiles. CMake can also perform system inspection operations like finding installed libraries and header files." diff --git a/Utilities/Release/README b/Utilities/Release/README new file mode 100644 index 000000000..12eafe18f --- /dev/null +++ b/Utilities/Release/README @@ -0,0 +1,21 @@ +To create a cmake release, make sure the "release" tag is pointing to the +expected git commit: + +http://cmake.org/gitweb?p=cmake.git;a=shortlog;h=refs/heads/release + +Then as kitware@hythloth, using an up-to-date CMake: + + cd ~/CMakeReleases/cmake/Utilities/Release + mkdir 283rc1 + cd 283rc1 + ~/CMakeReleases/build/bin/cmake -DCMAKE_CREATE_VERSION=release -P ../create-cmake-release.cmake + ./create-release.sh + + +create-cmake-release.cmake: script to run to create release sh scripts +Add or remove machines in create-cmake-release.cmake. + +Cygwin -> directory that contains cpack cygwin package files used in + CMakeCPack.cmake + +machine_release.cmake : config files for each machine diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake new file mode 100644 index 000000000..c304e6777 --- /dev/null +++ b/Utilities/Release/create-cmake-release.cmake @@ -0,0 +1,42 @@ +if(NOT DEFINED CMAKE_CREATE_VERSION) + set(CMAKE_CREATE_VERSION "release") + message("Using default value of 'release' for CMAKE_CREATE_VERSION") +endif() + +file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/logs) + +set(RELEASE_SCRIPTS_BATCH_1 + dash2win64_release.cmake # Windows + dashmacmini2_release.cmake # Mac Darwin universal ppc;i386 + dashmacmini5_release.cmake # Mac Darwin64 universal x86_64;i386 + magrathea_release.cmake # Linux + v20n250_aix_release.cmake # AIX 5.3 + ferrari_sgi64_release.cmake # IRIX 64 + ferrari_sgi_release.cmake # IRIX +) + +set(RELEASE_SCRIPTS_BATCH_2 + dash2win64_cygwin.cmake # Cygwin +) + +function(write_batch_shell_script filename) + set(scripts ${ARGN}) + set(i 0) + file(WRITE ${filename} "#!/bin/bash") + foreach(f ${scripts}) + math(EXPR x "420*(${i}/4)") + math(EXPR y "160*(${i}%4)") + file(APPEND ${filename} + " +${CMAKE_COMMAND} -DCMAKE_CREATE_VERSION=${CMAKE_CREATE_VERSION} -P ${CMAKE_ROOT}/Utilities/Release/${f} < /dev/null >& ${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_CREATE_VERSION}.log & +xterm -geometry 64x6+${x}+${y} -sb -sl 2000 -T ${f}-${CMAKE_CREATE_VERSION}.log -e tail -f ${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_CREATE_VERSION}.log& +") + math(EXPR i "${i}+1") + endforeach(f) + execute_process(COMMAND chmod a+x ${filename}) +endfunction() + +write_batch_shell_script("create-${CMAKE_CREATE_VERSION}-batch1.sh" ${RELEASE_SCRIPTS_BATCH_1}) +write_batch_shell_script("create-${CMAKE_CREATE_VERSION}-batch2.sh" ${RELEASE_SCRIPTS_BATCH_2}) + +message("Run ./create-${CMAKE_CREATE_VERSION}-batch1.sh, then after all those builds complete, run ./create-${CMAKE_CREATE_VERSION}-batch2.sh") diff --git a/Utilities/Release/dash2win64_cygwin.cmake b/Utilities/Release/dash2win64_cygwin.cmake new file mode 100644 index 000000000..78e8df0af --- /dev/null +++ b/Utilities/Release/dash2win64_cygwin.cmake @@ -0,0 +1,19 @@ +set(CMAKE_RELEASE_DIRECTORY "c:/cygwin/home/dashboard/CMakeReleaseCygwin") +set(PROCESSORS 9) +set(MAKE_PROGRAM "make") +set(MAKE "${MAKE_PROGRAM} -j8") +set(HOST dash2win64) +set(CPACK_BINARY_GENERATORS "CygwinBinary") +set(CPACK_SOURCE_GENERATORS "CygwinSource") +set(MAKE_PROGRAM "make") +set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release +CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE +CTEST_TEST_TIMEOUT:STRING=7200 +DART_TESTING_TIMEOUT:STRING=7200 +") +set(CXX g++) +set(CC gcc) +set(SCRIPT_NAME dash2win64cygwin) +set(GIT_EXTRA "git config core.autocrlf true") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash2win64_release.cmake new file mode 100644 index 000000000..fb82de0d0 --- /dev/null +++ b/Utilities/Release/dash2win64_release.cmake @@ -0,0 +1,19 @@ +set(CMAKE_RELEASE_DIRECTORY "c:/cygwin/home/dashboard/CMakeReleaseDirectory") +set(CONFIGURE_WITH_CMAKE TRUE) +set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files\\ \\(x86\\)/CMake\\ 2.8/bin/cmake.exe") +set(PROCESSORS 8) +set(HOST dash2win64) +set(CPACK_BINARY_GENERATORS "NSIS ZIP") +set(CPACK_SOURCE_GENERATORS "ZIP") +set(MAKE_PROGRAM "make") +set(MAKE "${MAKE_PROGRAM} -j8") +set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release +CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +CMAKE_Fortran_COMPILER:FILEPATH=FALSE +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +BUILD_QtDialog:BOOL:=TRUE +QT_QMAKE_EXECUTABLE:FILEPATH=c:/Dashboards/Support/qt-build/Qt/bin/qmake.exe +") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +set(GIT_EXTRA "git config core.autocrlf true") +include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/dashmacmini2_release.cmake b/Utilities/Release/dashmacmini2_release.cmake new file mode 100644 index 000000000..3e6b04973 --- /dev/null +++ b/Utilities/Release/dashmacmini2_release.cmake @@ -0,0 +1,18 @@ +set(PROCESSORS 2) +set(CMAKE_RELEASE_DIRECTORY /Users/kitware/CMakeReleaseDirectory) +set(USER_OVERRIDE "set(CMAKE_CXX_LINK_EXECUTABLE \\\"gcc <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -shared-libgcc -lstdc++-static\\\")") +set(INSTALL_PREFIX /) +set(HOST dashmacmini2) +set(MAKE_PROGRAM "make") +set(MAKE "${MAKE_PROGRAM} -j2") +set(CPACK_BINARY_GENERATORS "PackageMaker TGZ TZ") +set(INITIAL_CACHE " +CMAKE_BUILD_TYPE:STRING=Release +CMAKE_OSX_ARCHITECTURES:STRING=ppc;i386 +CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +CPACK_SYSTEM_NAME:STRING=Darwin-universal +BUILD_QtDialog:BOOL=TRUE +QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake +") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/dashmacmini5_release.cmake b/Utilities/Release/dashmacmini5_release.cmake new file mode 100644 index 000000000..bd93a8733 --- /dev/null +++ b/Utilities/Release/dashmacmini5_release.cmake @@ -0,0 +1,20 @@ +set(PROCESSORS 4) +set(CMAKE_RELEASE_DIRECTORY /Users/kitware/CMakeReleaseDirectory) +# set(USER_OVERRIDE "set(CMAKE_CXX_LINK_EXECUTABLE \\\"gcc <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -shared-libgcc -lstdc++-static\\\")") +set(INSTALL_PREFIX /) +set(HOST dashmacmini5) +set(MAKE_PROGRAM "make") +set(MAKE "${MAKE_PROGRAM} -j5") +set(CPACK_BINARY_GENERATORS "PackageMaker TGZ TZ") +set(CPACK_SOURCE_GENERATORS "TGZ TZ") +set(INITIAL_CACHE " +CMAKE_BUILD_TYPE:STRING=Release +CMAKE_OSX_ARCHITECTURES:STRING=x86_64;i386 +CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5 +CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +CPACK_SYSTEM_NAME:STRING=Darwin64-universal +BUILD_QtDialog:BOOL=TRUE +QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake +") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/ferrari_sgi64_release.cmake b/Utilities/Release/ferrari_sgi64_release.cmake new file mode 100644 index 000000000..4425f0557 --- /dev/null +++ b/Utilities/Release/ferrari_sgi64_release.cmake @@ -0,0 +1,16 @@ +set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory64") +set(PROCESSORS 2) +set(CFLAGS "-64") +set(FFLAGS "-64") +set(CXXFLAGS "-64") +set(LDFLAGS="-64") +set(HOST sgi) +set(SCRIPT_NAME sgi64) +set(MAKE_PROGRAM "make") +set(MAKE "${MAKE_PROGRAM} -P") +set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release +CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +CPACK_SYSTEM_NAME:STRING=IRIX64-64 +") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/ferrari_sgi_release.cmake b/Utilities/Release/ferrari_sgi_release.cmake new file mode 100644 index 000000000..ee5121a9b --- /dev/null +++ b/Utilities/Release/ferrari_sgi_release.cmake @@ -0,0 +1,11 @@ +set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory") +set(PROCESSORS 2) +set(HOST sgi) +set(MAKE_PROGRAM "make") +set(MAKE "${MAKE_PROGRAM} -P") +set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release +CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +CPACK_SYSTEM_NAME:STRING=IRIX64-n32 +") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/hythloth_release.cmake b/Utilities/Release/hythloth_release.cmake new file mode 100644 index 000000000..d2f4ba58c --- /dev/null +++ b/Utilities/Release/hythloth_release.cmake @@ -0,0 +1,10 @@ +set(PROCESSORS 2) +set(HOST hythloth) +set(MAKE_PROGRAM "make") +set(MAKE "${MAKE_PROGRAM} -j2") +set(INITIAL_CACHE " +CMAKE_BUILD_TYPE:STRING=Release +CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/magrathea_release.cmake b/Utilities/Release/magrathea_release.cmake new file mode 100644 index 000000000..1b2ae02c7 --- /dev/null +++ b/Utilities/Release/magrathea_release.cmake @@ -0,0 +1,16 @@ +set(PROCESSORS 1) +set(HOST magrathea) +set(MAKE_PROGRAM "make") +set(CC gcc332s) +set(CXX c++332s) +set(INITIAL_CACHE " +CMAKE_BUILD_TYPE:STRING=Release +CURSES_LIBRARY:FILEPATH=/usr/i686-gcc-332s/lib/libncurses.a +CURSES_INCLUDE_PATH:PATH=/usr/i686-gcc-332s/include/ncurses +FORM_LIBRARY:FILEPATH=/usr/i686-gcc-332s/lib/libform.a +CPACK_SYSTEM_NAME:STRING=Linux-i386 +BUILD_QtDialog:BOOL:=TRUE +QT_QMAKE_EXECUTABLE:FILEPATH=/home/kitware/qt-4.43-install/bin/qmake +") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake new file mode 100644 index 000000000..0c9b3f9c5 --- /dev/null +++ b/Utilities/Release/release_cmake.cmake @@ -0,0 +1,136 @@ +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) +if(DEFINED EXTRA_COPY) + set(HAS_EXTRA_COPY 1) +endif(DEFINED EXTRA_COPY) +if(NOT DEFINED CMAKE_RELEASE_DIRECTORY) + set(CMAKE_RELEASE_DIRECTORY "~/CMakeReleaseDirectory") +endif(NOT DEFINED CMAKE_RELEASE_DIRECTORY) +if(NOT DEFINED SCRIPT_NAME) + set(SCRIPT_NAME "${HOST}") +endif(NOT DEFINED SCRIPT_NAME) +if(NOT DEFINED MAKE_PROGRAM) + message(FATAL_ERROR "MAKE_PROGRAM must be set") +endif(NOT DEFINED MAKE_PROGRAM) +if(NOT DEFINED MAKE) + set(MAKE "${MAKE_PROGRAM}") +endif(NOT DEFINED MAKE) +if(NOT DEFINED RUN_SHELL) + set(RUN_SHELL "/bin/sh") +endif(NOT DEFINED RUN_SHELL) +if(NOT DEFINED PROCESSORS) + set(PROCESSORS 1) +endif(NOT DEFINED PROCESSORS) +if(NOT DEFINED CMAKE_CREATE_VERSION) + message(FATAL_ERROR "CMAKE_CREATE_VERSION not defined") +endif(NOT DEFINED CMAKE_CREATE_VERSION) +if(NOT DEFINED GIT_COMMAND) + set(GIT_COMMAND git) +endif() + +if(${CMAKE_CREATE_VERSION} MATCHES "^(release|maint|next|nightly)$") + set(GIT_BRANCH origin/${CMAKE_CREATE_VERSION}) +else() + set(GIT_BRANCH ${CMAKE_CREATE_VERSION}) +endif() + +if(NOT DEFINED FINAL_PATH ) + set(FINAL_PATH ${CMAKE_RELEASE_DIRECTORY}/${CMAKE_CREATE_VERSION}-build) +endif(NOT DEFINED FINAL_PATH ) + +if(NOT HOST) + message(FATAL_ERROR "HOST must be specified with -DHOST=host") +endif(NOT HOST) +if(NOT DEFINED MAKE) + message(FATAL_ERROR "MAKE must be specified with -DMAKE=\"make -j2\"") +endif(NOT DEFINED MAKE) + +message("Creating CMake release ${CMAKE_CREATE_VERSION} on ${HOST} with parallel = ${PROCESSORS}") + +# define a macro to run a remote command +macro(remote_command comment command) + message("${comment}") + 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) + message("ssh ${HOST} ${EXTRA_HOP} ${command}") + execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result) + endif(${ARGC} GREATER 2) + if(${result} GREATER 0) + message(FATAL_ERROR "Error running command: ${command}, return value = ${result}") + endif(${result} GREATER 0) +endmacro(remote_command) + +# set this so configure file will work from script mode +# create the script specific for the given host +set(SCRIPT_FILE release_cmake-${SCRIPT_NAME}.sh) +configure_file(${SCRIPT_PATH}/release_cmake.sh.in ${SCRIPT_FILE} @ONLY) + +# run the script by starting a shell on the remote machine +# 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) + remote_command("run release_cmake-${HOST}.sh on server" + "${RUN_SHELL}" ${SCRIPT_FILE}) +ENDIF(RUN_LOCAL) + +# now figure out which types of packages were created +set(generators ${CPACK_BINARY_GENERATORS} ${CPACK_SOURCE_GENERATORS}) +separate_arguments(generators) +foreach(gen ${generators}) + if("${gen}" STREQUAL "TGZ") + set(SUFFIXES ${SUFFIXES} "*.tar.gz") + endif("${gen}" STREQUAL "TGZ") + if("${gen}" STREQUAL "STGZ") + set(SUFFIXES ${SUFFIXES} "*.sh") + endif("${gen}" STREQUAL "STGZ") + if("${gen}" STREQUAL "PackageMaker") + set(SUFFIXES ${SUFFIXES} "*.dmg") + endif("${gen}" STREQUAL "PackageMaker") + if("${gen}" STREQUAL "TBZ2") + set(SUFFIXES ${SUFFIXES} "*.tar.bz2") + endif("${gen}" STREQUAL "TBZ2") + if("${gen}" MATCHES "Cygwin") + set(SUFFIXES ${SUFFIXES} "*.tar.bz2") + set(extra_files setup.hint) + endif("${gen}" MATCHES "Cygwin") + if("${gen}" STREQUAL "TZ") + set(SUFFIXES ${SUFFIXES} "*.tar.Z") + endif("${gen}" STREQUAL "TZ") + if("${gen}" STREQUAL "ZIP") + set(SUFFIXES ${SUFFIXES} "*.zip") + endif("${gen}" STREQUAL "ZIP") + if("${gen}" STREQUAL "NSIS") + set(SUFFIXES ${SUFFIXES} "*.exe") + endif("${gen}" STREQUAL "NSIS") +endforeach(gen) +# copy all the files over from the remote machine +set(PROJECT_PREFIX cmake-) +foreach(suffix ${SUFFIXES}) + message("scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .") + execute_process(COMMAND + scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} . + 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) + +# if there are extra files to copy get them as well +if(extra_files) + foreach(f ${extra_files}) + message("scp ${HOST}:${FINAL_PATH}/${f} .") + execute_process(COMMAND + scp ${HOST}:${FINAL_PATH}/${f} . + 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) diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in new file mode 100755 index 000000000..50882c5de --- /dev/null +++ b/Utilities/Release/release_cmake.sh.in @@ -0,0 +1,154 @@ +#!/bin/sh +echo "Start release" +date +echo "" +echo "remove and create working directory @CMAKE_RELEASE_DIRECTORY@" +rm -rf @CMAKE_RELEASE_DIRECTORY@ +mkdir @CMAKE_RELEASE_DIRECTORY@ + +check_exit_value() +{ + VALUE="$1" + if [ "$VALUE" != "0" ]; then + echo "error in $2" + exit 1 + fi +} + +if [ ! -z "@CC@" ]; then + export CC="@CC@" + check_exit_value $? "set CC compiler env var" || exit 1 +fi + +if [ ! -z "@FC@" ]; then + export FC="@FC@" + check_exit_value $? "set FC compiler env var" || exit 1 +fi + +if [ ! -z "@CXX@" ]; then + export CXX="@CXX@" + check_exit_value $? "set CC compiler env var" || exit 1 +fi + +if [ ! -z "@LDFLAGS@" ]; then + export LDFLAGS="@LDFLAGS@" + check_exit_value $? "set LDFLAGS env var" || exit 1 +fi + +if [ ! -z "@FFLAGS@" ]; then + export FFLAGS="@FFLAGS@" + check_exit_value $? "set FFLAGS env var" || exit 1 +fi + +if [ ! -z "@CFLAGS@" ]; then + export CFLAGS="@CFLAGS@" + check_exit_value $? "set CFLAGS env var" || exit 1 +fi + +if [ ! -z "@CXXFLAGS@" ]; then + export CXXFLAGS="@CXXFLAGS@" + check_exit_value $? "setCXXFLAGS env var" || exit 1 +fi + +if [ ! -z "@USER_MAKE_RULE_FILE_CONTENTS@" ]; then + echo "@USER_MAKE_RULE_FILE_CONTENTS@" > "@USER_MAKE_RULE_FILE@" + check_exit_value $? "Create User Rule file" || exit 1 +fi +echo "Create a directory to build in" +rm -rf @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build +check_exit_value $? "Remove build tree" || exit 1 +mkdir @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build +check_exit_value $? "Create build directory" || exit 1 +# make sure directory was created +if [ ! -d @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build ]; then + echo "Could not create @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build" + exit -1 +fi + +echo "Create initial cache" +echo "@INITIAL_CACHE@" > @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build/CMakeCache.txt +check_exit_value $? "Create initial cache" || exit 1 + +# create a user override file user.txt if USER_OVERRIDE is set, +# and append the cache variable to the cache +if [ ! -z "@USER_OVERRIDE@" ]; then + echo "@USER_OVERRIDE@" > @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build/user.txt + echo "CMAKE_USER_MAKE_RULES_OVERRIDE:FILEPATH=@CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build/user.txt" >> @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build/CMakeCache.txt +fi + +echo "Checkout the source for @CMAKE_CREATE_VERSION@" +cd @CMAKE_RELEASE_DIRECTORY@ +if [ ! -z "@GIT_COMMAND@" ]; then + # clone the repo without creating any source files in the directory + # matching the branch being built (i.e. master CMake-2-8, etc) + @GIT_COMMAND@ clone -n git://cmake.org/cmake.git @CMAKE_CREATE_VERSION@ + check_exit_value $? "Checkout git cmake source" || exit 1 + # go into the git directory + cd @CMAKE_CREATE_VERSION@ + # run any extra commands if they exist + @GIT_EXTRA@ + check_exit_value $? "git extra cmake source" || exit 1 + # now checkout a copy on the local branch working + @GIT_COMMAND@ checkout -b working @GIT_BRANCH@ + check_exit_value $? "git checkout" || exit 1 + cd .. +else + echo GIT_COMMAND does not exist + exit 1 +fi + +cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build + +if [ ! -z "@CONFIGURE_WITH_CMAKE@" ]; then + echo "Run cmake to configure cmake" + @CMAKE_CONFIGURE_PATH@ ../@CMAKE_CREATE_VERSION@ + check_exit_value $? "Configure cmake" || exit 1 +else + if [ -z "@INSTALL_PREFIX@" ]; then + echo "Run cmake bootstrap --parallel=@PROCESSORS@" + ../@CMAKE_CREATE_VERSION@/bootstrap --parallel=@PROCESSORS@ + check_exit_value $? "Bootstrap cmake" || exit 1 + else + echo "Run cmake bootstrap --prefix=@INSTALL_PREFIX@ --parallel=@PROCESSORS@" + ../@CMAKE_CREATE_VERSION@/bootstrap --prefix=@INSTALL_PREFIX@ --parallel=@PROCESSORS@ + check_exit_value $? "Bootstrap cmake" || exit 1 + fi +fi + +echo "Build cmake with @MAKE@" +@MAKE@ +check_exit_value $? "Build cmake" || exit 1 + +if [ -z "@SKIP_TESTS@" ]; then + echo "Run cmake tests" + ./bin/ctest --output-on-failure -j @PROCESSORS@ test + check_exit_value $? "Test cmake" || exit 1 +fi + +# loop over binary generators +generators="@CPACK_BINARY_GENERATORS@" +for GEN in $generators; do + echo "Create $GEN package" + ./bin/cpack -D CMAKE_MAKE_PROGRAM=@MAKE_PROGRAM@ -G $GEN + check_exit_value $? "Create $GEN package" || exit 1 +done + +# loop over source generators +generators="@CPACK_SOURCE_GENERATORS@" +for GEN in $generators; do + echo "Create $GEN package" + ./bin/cpack -D CMAKE_MAKE_PROGRAM=@MAKE_PROGRAM@ -G $GEN --config CPackSourceConfig.cmake + check_exit_value $? "Create $GEN package" || exit 1 +done + + + +# need to add an extra copy thing here +if [ ! -z "@EXTRA_COPY@" ]; then + @EXTRA_COPY@ + check_exit_value $? "Extra copy step @EXTRA_COPY@" || exit 1 +fi +echo "End release" +date +echo "" +exit 0 diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake new file mode 100644 index 000000000..dc6c78f38 --- /dev/null +++ b/Utilities/Release/upload_release.cmake @@ -0,0 +1,30 @@ +set(PROJECT_PREFIX cmake-) +if(NOT VERSION) + set(VERSION 2.8) +endif() +set(dir "v${VERSION}") +if("${VERSION}" MATCHES "master") + set(dir "dev") +endif() +file(GLOB FILES ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_PREFIX}*") +list(SORT FILES) +list(REVERSE FILES) +message("${FILES}") +set(UPLOAD_LOC + "kitware@www.cmake.org:/projects/FTP/pub/cmake/${dir}") +set(count 0) +foreach(file ${FILES}) + if(NOT IS_DIRECTORY ${file}) + message("upload ${file} ${UPLOAD_LOC}") + execute_process(COMMAND + scp ${file} ${UPLOAD_LOC} + RESULT_VARIABLE result) + math(EXPR count "${count} + 1") + if("${result}" GREATER 0) + message(FATAL_ERROR "failed to upload file to ${UPLOAD_LOC}") + endif() + endif() +endforeach(file) +if(${count} EQUAL 0) + message(FATAL_ERROR "Error no files uploaded.") +endif() diff --git a/Utilities/Release/v20n250_aix_release.cmake b/Utilities/Release/v20n250_aix_release.cmake new file mode 100644 index 000000000..53c34d7ce --- /dev/null +++ b/Utilities/Release/v20n250_aix_release.cmake @@ -0,0 +1,21 @@ +set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory") +set(FINAL_PATH /u/noibm34/cmake-release) +set(PROCESSORS 2) +set(HOST "sshserv.centers.ihost.com") +set(EXTRA_HOP "rsh p90n03") +set(MAKE_PROGRAM "make") +set(CC "xlc_r") +set(CXX "xlC_r") +set(FC "xlf") +set(INITIAL_CACHE " +CMAKE_BUILD_TYPE:STRING=Release +CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +") +set(EXTRA_COPY " +rm -rf ~/cmake-release +mkdir ~/cmake-release +mv *.sh ~/cmake-release +mv *.Z ~/cmake-release +mv *.gz ~/cmake-release") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +include(${path}/release_cmake.cmake) |