Commit b43af94a authored by David Cole's avatar David Cole
Browse files

CMake: eliminate use of cvs in the Release scripts

Set GIT_COMMAND to "git" -- each machine involved in building
the CMake release binaries has the right "git" in the PATH.

Separate the release scripts into two batches so we can build
multiple releases on the same machine, in serial, if necessary.
We currnetly do this with the Windows and Cygwin release
binaries on dash2win64.

Sort the files to be uploaded, so that sorting them by modification
time (file copy / upload time) is equivalent to sorting them
alphabetically.
parent 8af1eaf4
if(NOT DEFINED CMAKE_CREATE_VERSION)
message(FATAL_ERROR "CMAKE_CREATE_VERSION not defined")
endif(NOT DEFINED CMAKE_CREATE_VERSION)
set(CMAKE_CREATE_VERSION "release")
message("Using default value of 'release' for CMAKE_CREATE_VERSION")
endif()
set(RELEASE_SCRIPTS
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/logs)
set(RELEASE_SCRIPTS_BATCH_1
dash2win64_release.cmake # Windows
dashmacmini2_release.cmake # Mac Darwin universal
dashsun1_release.cmake # SunOS
# destiny_release.cmake # HPUX -- destiny is dead; long live destiny
magrathea_release.cmake # Linux
dash2win64_release.cmake # Windows
# dash2win64_cygwin.cmake # Cygwin
# blight_cygwin.cmake # Cygwin
v20n250_aix_release.cmake # AIX 5.3
dashsun1_release.cmake # SunOS
v20n250_aix_release.cmake # AIX 5.3
ferrari_sgi64_release.cmake # IRIX 64
ferrari_sgi_release.cmake # IRIX 64
ferrari_sgi_release.cmake # IRIX
)
file(WRITE create-${CMAKE_CREATE_VERSION}.sh "#!/bin/bash")
make_directory(${CMAKE_CURRENT_SOURCE_DIR}/logs)
set(RELEASE_SCRIPTS_BATCH_2
dash2win64_cygwin.cmake # Cygwin
)
foreach(f ${RELEASE_SCRIPTS})
file(APPEND create-${CMAKE_CREATE_VERSION}.sh
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 80x10 -sb -sl 2000 -T ${f}-${CMAKE_CREATE_VERSION}.log -e tail -f ${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_CREATE_VERSION}.log&")
endforeach(f)
execute_process(COMMAND chmod a+x create-${CMAKE_CREATE_VERSION}.sh)
message("Run ./create-${CMAKE_CREATE_VERSION}.sh")
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")
......@@ -12,7 +12,6 @@ CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE
set(CXX g++)
set(CC gcc)
set(SCRIPT_NAME dash2win64cygwin)
set(GIT_COMMAND git)
set(GIT_EXTRA "git config core.autocrlf true")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${path}/release_cmake.cmake)
......@@ -15,6 +15,5 @@ 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_COMMAND git)
set(GIT_EXTRA "git config core.autocrlf true")
include(${path}/release_cmake.cmake)
......@@ -15,6 +15,5 @@ CPACK_SYSTEM_NAME:STRING=Darwin-universal
BUILD_QtDialog:BOOL:=TRUE
QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Software/QtBinUniversal/bin/qmake
")
set(GIT_COMMAND /opt/local/bin/git)
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${path}/release_cmake.cmake)
set(CVS_COMMAND "/home/whoffman/bin/cvs")
set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory64")
set(PROCESSORS 2)
set(CFLAGS "-64")
......
set(CVS_COMMAND "/home/whoffman/bin/cvs")
set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory")
set(PROCESSORS 2)
set(HOST sgi)
......
......@@ -3,7 +3,6 @@ set(HOST magrathea)
set(MAKE_PROGRAM "make")
set(CC gcc332s)
set(CXX c++332s)
set(GIT_COMMAND /home/kitware/.userroot/git/bin/git)
set(INITIAL_CACHE "
CMAKE_BUILD_TYPE:STRING=Release
CURSES_LIBRARY:FILEPATH=/usr/i686-gcc-332s/lib/libncurses.a
......
set(CVSROOT ":pserver:anonymous@cmake.org:/cmake.git")
get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
# default to self extracting tgz, tgz, and tar.Z
......@@ -30,17 +28,15 @@ 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 CVS_COMMAND)
set(CVS_COMMAND cvs)
endif(NOT DEFINED CVS_COMMAND)
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()
set( CMAKE_CHECKOUT "${CVS_COMMAND} -q -d ${CVSROOT} co -d ${CMAKE_CREATE_VERSION} ${CMAKE_CREATE_VERSION}")
if(NOT DEFINED FINAL_PATH )
set(FINAL_PATH ${CMAKE_RELEASE_DIRECTORY}/${CMAKE_CREATE_VERSION}-build)
......
......@@ -93,10 +93,8 @@ if [ ! -z "@GIT_COMMAND@" ]; then
check_exit_value $? "git checkout" || exit 1
cd ..
else
# for CVS just run the CMAKE_CHECKOUT command as set
# in release_cmake.cmake
@CMAKE_CHECKOUT@
check_exit_value $? "CVS Checkout cmake source" || exit 1
echo GIT_COMMAND does not exist
exit 1
fi
cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build
......
......@@ -2,13 +2,16 @@ set(PROJECT_PREFIX cmake-)
if(NOT VERSION)
set(VERSION 2.8)
endif()
set(dir "v${VERSION}")
if("${VERSION}" MATCHES "master")
set(VERSION CVS)
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/v${VERSION}")
"kitware@www.cmake.org:/projects/FTP/pub/cmake/${dir}")
set(count 0)
foreach(file ${FILES})
if(NOT IS_DIRECTORY ${file})
......@@ -19,8 +22,8 @@ foreach(file ${FILES})
math(EXPR count "${count} + 1")
if("${result}" GREATER 0)
message(FATAL_ERROR "failed to upload file to ${UPLOAD_LOC}")
endif("${result}" GREATER 0)
endif(NOT IS_DIRECTORY ${file})
endif()
endif()
endforeach(file)
if(${count} EQUAL 0)
message(FATAL_ERROR "Error no files uploaded.")
......
set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory")
set(FINAL_PATH /u/noibm34/cmake-release)
set(PROCESSORS 2)
set(CVS_COMMAND /vol/local/bin/cvs)
set(HOST "sshserv.centers.ihost.com")
set(EXTRA_HOP "rsh p90n03")
set(MAKE_PROGRAM "make")
......
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