ENH: change to use CMAKE_CREATE_VERSION from CMAKE_VERSION as CMAKE_VERSION is auto-defined now
This commit is contained in:
parent
1dee719cdc
commit
ef5b9d00a2
|
@ -2,7 +2,7 @@ To create a cmake release, first test the branch:
|
|||
|
||||
mkdir 2-4
|
||||
cd 2-4
|
||||
cmake -DCMAKE_VERSION=CMake-2-4 -P ../create-cmake-release.cmake
|
||||
cmake -DCMAKE_CREATE_VERSION=CMake-2-4 -P ../create-cmake-release.cmake
|
||||
./create-CMake-2-4.sh
|
||||
|
||||
If that works:
|
||||
|
@ -15,7 +15,7 @@ cvs tag 2-4-7
|
|||
Then create a release from the tag:
|
||||
mkdir 2-4-7
|
||||
cd 2-4-7
|
||||
cmake -DCMAKE_VERSION=CMake-2-4-7 -P ../create-cmake-release.cmake
|
||||
cmake -DCMAKE_CREATE_VERSION=CMake-2-4-7 -P ../create-cmake-release.cmake
|
||||
./create-CMake-2-4.sh
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
if(NOT DEFINED CMAKE_VERSION)
|
||||
message(FATAL_ERROR "CMAKE_VERSION not defined")
|
||||
endif(NOT DEFINED CMAKE_VERSION)
|
||||
if(NOT DEFINED CMAKE_CREATE_VERSION)
|
||||
message(FATAL_ERROR "CMAKE_CREATE_VERSION not defined")
|
||||
endif(NOT DEFINED CMAKE_CREATE_VERSION)
|
||||
|
||||
set(RELEASE_SCRIPTS
|
||||
dashmacmini2_release.cmake # Mac Darwin universal
|
||||
|
@ -18,16 +18,16 @@ set(RELEASE_SCRIPTS
|
|||
# r15n65_aix_release.cmake # AIX 5.2
|
||||
)
|
||||
|
||||
file(WRITE create-${CMAKE_VERSION}.sh "#!/bin/sh")
|
||||
file(WRITE create-${CMAKE_CREATE_VERSION}.sh "#!/bin/sh")
|
||||
make_directory(${CMAKE_CURRENT_SOURCE_DIR}/logs)
|
||||
|
||||
foreach(f ${RELEASE_SCRIPTS})
|
||||
file(APPEND create-${CMAKE_VERSION}.sh
|
||||
file(APPEND create-${CMAKE_CREATE_VERSION}.sh
|
||||
"
|
||||
${CMAKE_COMMAND} -DCMAKE_VERSION=${CMAKE_VERSION} -P ${CMAKE_ROOT}/Utilities/Release/${f} < /dev/null >& ${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_VERSION}.log &
|
||||
xterm -geometry 80x10 -sb -sl 2000 -T ${f}-${CMAKE_VERSION}.log -e tail -f ${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_VERSION}.log&")
|
||||
${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_VERSION}.sh)
|
||||
message("Run ./create-${CMAKE_VERSION}.sh")
|
||||
execute_process(COMMAND chmod a+x create-${CMAKE_CREATE_VERSION}.sh)
|
||||
message("Run ./create-${CMAKE_CREATE_VERSION}.sh")
|
||||
|
||||
|
||||
|
|
|
@ -26,22 +26,22 @@ endif(NOT DEFINED RUN_SHELL)
|
|||
if(NOT DEFINED PROCESSORS)
|
||||
set(PROCESSORS 1)
|
||||
endif(NOT DEFINED PROCESSORS)
|
||||
if(NOT DEFINED CMAKE_VERSION)
|
||||
message(FATAL_ERROR "CMAKE_VERSION not defined")
|
||||
endif(NOT DEFINED CMAKE_VERSION)
|
||||
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("${CMAKE_VERSION}" STREQUAL "CVS")
|
||||
if("${CMAKE_CREATE_VERSION}" STREQUAL "CVS")
|
||||
set( CMAKE_CHECKOUT "${CVS_COMMAND} -q -z3 -d ${CVSROOT} export -D now ")
|
||||
set( CMAKE_VERSION "CurrentCVS")
|
||||
else("${CMAKE_VERSION}" STREQUAL "CVS")
|
||||
set( CMAKE_CHECKOUT "${CVS_COMMAND} -q -z3 -d ${CVSROOT} export -r ${CMAKE_VERSION} ")
|
||||
endif("${CMAKE_VERSION}" STREQUAL "CVS")
|
||||
set( CMAKE_CREATE_VERSION "CurrentCVS")
|
||||
else("${CMAKE_CREATE_VERSION}" STREQUAL "CVS")
|
||||
set( CMAKE_CHECKOUT "${CVS_COMMAND} -q -z3 -d ${CVSROOT} export -r ${CMAKE_CREATE_VERSION} ")
|
||||
endif("${CMAKE_CREATE_VERSION}" STREQUAL "CVS")
|
||||
|
||||
if(NOT DEFINED FINAL_PATH )
|
||||
set(FINAL_PATH ${CMAKE_RELEASE_DIRECTORY}/${CMAKE_VERSION}-build)
|
||||
set(FINAL_PATH ${CMAKE_RELEASE_DIRECTORY}/${CMAKE_CREATE_VERSION}-build)
|
||||
endif(NOT DEFINED FINAL_PATH )
|
||||
|
||||
if(NOT HOST)
|
||||
|
@ -51,7 +51,7 @@ if(NOT DEFINED MAKE)
|
|||
message(FATAL_ERROR "MAKE must be specified with -DMAKE=\"make -j2\"")
|
||||
endif(NOT DEFINED MAKE)
|
||||
|
||||
message("Creating CMake release ${CMAKE_VERSION} on ${HOST} with parallel = ${PROCESSORS}")
|
||||
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)
|
||||
|
|
|
@ -50,42 +50,42 @@ if [ ! -z "@USER_MAKE_RULE_FILE_CONTENTS@" ]; then
|
|||
check_exit_value $? "Create User Rule file" || exit 1
|
||||
fi
|
||||
echo "Create a directory to build in"
|
||||
rm -rf @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build
|
||||
rm -rf @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build
|
||||
check_exit_value $? "Remove build tree" || exit 1
|
||||
mkdir @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build
|
||||
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_VERSION@-build ]; then
|
||||
echo "Could not create @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build"
|
||||
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_VERSION@-build/CMakeCache.txt
|
||||
echo "@INITIAL_CACHE@" > @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build/CMakeCache.txt
|
||||
check_exit_value $? "Create initial cache" || exit 1
|
||||
|
||||
#echo "Login into cvs."
|
||||
#echo "cmake" | @CVS_COMMAND@ -d @CVSROOT@ login
|
||||
|
||||
echo "Checkout the source for @CMAKE_VERSION@"
|
||||
echo "Checkout the source for @CMAKE_CREATE_VERSION@"
|
||||
cd @CMAKE_RELEASE_DIRECTORY@
|
||||
@CMAKE_CHECKOUT@ -d @CMAKE_VERSION@ CMake
|
||||
@CMAKE_CHECKOUT@ -d @CMAKE_CREATE_VERSION@ CMake
|
||||
check_exit_value $? "Checkout cmake source" || exit 1
|
||||
|
||||
cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_VERSION@-build
|
||||
cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build
|
||||
|
||||
if [ ! -z "@CONFIGURE_WITH_CMAKE@" ]; then
|
||||
echo "Run cmake to configure cmake"
|
||||
@CMAKE_CONFIGURE_PATH@ ../@CMAKE_VERSION@
|
||||
@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_VERSION@/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_VERSION@/bootstrap --prefix=@INSTALL_PREFIX@ --parallel=@PROCESSORS@
|
||||
../@CMAKE_CREATE_VERSION@/bootstrap --prefix=@INSTALL_PREFIX@ --parallel=@PROCESSORS@
|
||||
check_exit_value $? "Bootstrap cmake" || exit 1
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue