ENH: getting better

This commit is contained in:
Bill Hoffman 2006-05-02 23:20:02 -04:00
parent 38c1ab5cb2
commit 86beb67afd
4 changed files with 61 additions and 22 deletions

View File

@ -0,0 +1,10 @@
set(PROCESSORS 2)
set(HOST dashmacmini2)
set(MAKE "make -j2")
set(INITIAL_CACHE "
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_OSX_ARCHITECTURES:STRING=ppc\;i386
")
set(INSTALLER_SUFFIX "*.dmg")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${path}/release_cmake.cmake)

View File

@ -1,12 +1,22 @@
set(PROCESSORS 2) set(PROCESSORS 1)
set(HOST dashsun1) set(HOST dashsun1)
set(MAKE "make -j2") set(MAKE "make")
execute_process(COMMAND ssh ${HOST} pwd RESULT_VARIABLE result OUTPUT_VARIABLE BUILD_DIR) execute_process(COMMAND ssh ${HOST}
message(fatal_error ${BUILD_DIR}/CMakeReleaseDirectory/UserMakeRules.cmake) pwd RESULT_VARIABLE result OUTPUT_VARIABLE BUILD_DIR)
# now strip the newline (we need perl chop...)
string(LENGTH "${BUILD_DIR}" length)
math(EXPR length "${length} -1" )
string(SUBSTRING "${BUILD_DIR}" 0 ${length} BUILD_DIR)
set(USER_MAKE_RULE_FILE
"${BUILD_DIR}/CMakeReleaseDirectory/UserMakeRules.cmake")
set(INITIAL_CACHE " set(INITIAL_CACHE "
CMAKE_EXE_LINKER_FLAGS:STRING=-Bstatic CMAKE_BUILD_TYPE:STRING=Release
CMAKE_USER_MAKE_RULES_OVERRIDE:STRING=${BINDIR}/UserMakeRules.cmake HAVE_LIBDL:INTERNAL=FALSE
CMAKE_EXE_LINKER_FLAGS:STRING=-Bdynamic -ldl -Bstatic
CMAKE_USER_MAKE_RULES_OVERRIDE:STRING=${USER_MAKE_RULE_FILE}
CURSES_LIBRARY:FILEPATH=/usr/lib/libcurses.a CURSES_LIBRARY:FILEPATH=/usr/lib/libcurses.a
FORM_LIBRARY:FILEPATH=/usr/lib/libform.a") FORM_LIBRARY:FILEPATH=/usr/lib/libform.a")
set(USER_MAKE_RULES "SET(CMAKE_DL_LIBS \"-Bdynamic -ldl -Bstatic\")" set(USER_MAKE_RULE_FILE_CONTENTS
include(release_cmake.cmake) "SET(CMAKE_DL_LIBS \\\\\"-Bdynamic -ldl -Bstatic\\\\\")")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${path}/release_cmake.cmake)

View File

@ -1,4 +1,8 @@
set(PROCESSORS 2) set(PROCESSORS 2)
set(HOST hythloth) set(HOST hythloth)
set(MAKE "make -j2") set(MAKE "make -j2")
include(release_cmake.cmake) set(INITIAL_CACHE "
CMAKE_BUILD_TYPE:STRING=Release
")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${path}/release_cmake.cmake)

View File

@ -1,5 +1,9 @@
set(CVSROOT ":pserver:anonymous@www.cmake.org:/cvsroot/CMake") set(CVSROOT ":pserver:anonymous@www.cmake.org:/cvsroot/CMake")
# used for -j builds get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(NOT DEFINED INSTALLER_SUFFIX)
set(INSTALLER_SUFFIX "*.sh")
endif(NOT DEFINED INSTALLER_SUFFIX)
if(NOT DEFINED PROCESSORS) if(NOT DEFINED PROCESSORS)
set(PROCESSORS 1) set(PROCESSORS 1)
endif(NOT DEFINED PROCESSORS) endif(NOT DEFINED PROCESSORS)
@ -23,7 +27,6 @@ macro(remote_command comment command)
else(${ARGC} GREATER 2) else(${ARGC} GREATER 2)
execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result) execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result)
endif(${ARGC} GREATER 2) endif(${ARGC} GREATER 2)
message("${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)
@ -33,18 +36,30 @@ endmacro(remote_command)
remote_command( remote_command(
"remove and create working directory ~/CMakeReleaseDirectory" "remove and create working directory ~/CMakeReleaseDirectory"
"rm -rf ~/CMakeReleaseDirectory && mkdir ~/CMakeReleaseDirectory") "rm -rf ~/CMakeReleaseDirectory && mkdir ~/CMakeReleaseDirectory")
# login to cvs # create user make rule file
remote_command( if(DEFINED USER_MAKE_RULE_FILE_CONTENTS)
"Login into cvs." remote_command("Create ${USER_MAKE_RULE_FILE}"
"cvs -d ${CVSROOT} login" cmake_login) "echo ${USER_MAKE_RULE_FILE_CONTENTS} > ${USER_MAKE_RULE_FILE}" )
# checkout the source endif(DEFINED USER_MAKE_RULE_FILE_CONTENTS)
remote_command(
"Checkout the source for ${CMAKE_VERSION}"
"cd ~/CMakeReleaseDirectory && cvs -q -z3 -d ${CVSROOT} export -r ${CMAKE_VERSION} -d ${CMAKE_VERSION} CMake")
# create the build directory # create the build directory
remote_command( remote_command(
"Create a directory to build in" "Create a directory to build in"
"rm -rf ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && mkdir ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build") "rm -rf ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && mkdir ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build")
# set the initial cache
if(DEFINED INITIAL_CACHE)
remote_command("Create ${USER_MAKE_RULE_FILE}"
"echo \"${INITIAL_CACHE}\" > ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build/CMakeCache.txt" )
endif(DEFINED INITIAL_CACHE)
# login to cvs
remote_command(
"Login into cvs."
"cvs -d ${CVSROOT} login" "${SCRIPT_PATH}/cmake_login")
# checkout the source
remote_command(
"Checkout the source for ${CMAKE_VERSION}"
"cd ~/CMakeReleaseDirectory && cvs -q -z3 -d ${CVSROOT} export -r ${CMAKE_VERSION} -d ${CMAKE_VERSION} CMake")
# now bootstrap cmake # now bootstrap cmake
remote_command( remote_command(
"Run cmake bootstrap --parallel=${PROCESSORS}" "Run cmake bootstrap --parallel=${PROCESSORS}"
@ -61,6 +76,7 @@ remote_command(
remote_command( remote_command(
"Run cmake tests" "Run cmake tests"
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ${MAKE} test") "cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ${MAKE} test")
# package cmake with self-extracting shell script # package cmake with self-extracting shell script
remote_command( remote_command(
"Package cmake" "Package cmake"
@ -69,10 +85,9 @@ remote_command(
remote_command( remote_command(
"Package cmake" "Package cmake"
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ./bin/cpack -G TGZ") "cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ./bin/cpack -G TGZ")
message("copy the .gz file back from the machine") message("copy the .gz file back from the machine")
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz . execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz .
RESULT_VARIABLE result) RESULT_VARIABLE result)
message("copy the .sh file back from the machine") message("copy the ${INSTALLER_SUFFIX} file back from the machine")
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.sh . execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/${INSTALLER_SUFFIX} .
RESULT_VARIABLE result) RESULT_VARIABLE result)