summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-05-03 03:20:02 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-05-03 03:20:02 (GMT)
commit86beb67afdabe09bfe9d8d927dff834db3b7fdd5 (patch)
tree646882b1441923e1fd5b3c8f399dc76c19af49cf /Utilities
parent38c1ab5cb2734af95b5d640ed88f6bb2f1dd78bc (diff)
downloadCMake-86beb67afdabe09bfe9d8d927dff834db3b7fdd5.zip
CMake-86beb67afdabe09bfe9d8d927dff834db3b7fdd5.tar.gz
CMake-86beb67afdabe09bfe9d8d927dff834db3b7fdd5.tar.bz2
ENH: getting better
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/Release/dashmacmini2_release.cmake10
-rw-r--r--Utilities/Release/dashsun1_release.cmake26
-rw-r--r--Utilities/Release/hythloth_release.cmake6
-rw-r--r--Utilities/Release/release_cmake.cmake35
4 files changed, 58 insertions, 19 deletions
diff --git a/Utilities/Release/dashmacmini2_release.cmake b/Utilities/Release/dashmacmini2_release.cmake
new file mode 100644
index 0000000..9494c26
--- /dev/null
+++ b/Utilities/Release/dashmacmini2_release.cmake
@@ -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)
diff --git a/Utilities/Release/dashsun1_release.cmake b/Utilities/Release/dashsun1_release.cmake
index b28e134..619609e 100644
--- a/Utilities/Release/dashsun1_release.cmake
+++ b/Utilities/Release/dashsun1_release.cmake
@@ -1,12 +1,22 @@
-set(PROCESSORS 2)
+set(PROCESSORS 1)
set(HOST dashsun1)
-set(MAKE "make -j2")
-execute_process(COMMAND ssh ${HOST} pwd RESULT_VARIABLE result OUTPUT_VARIABLE BUILD_DIR)
-message(fatal_error ${BUILD_DIR}/CMakeReleaseDirectory/UserMakeRules.cmake)
+set(MAKE "make")
+execute_process(COMMAND ssh ${HOST}
+ 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 "
-CMAKE_EXE_LINKER_FLAGS:STRING=-Bstatic
-CMAKE_USER_MAKE_RULES_OVERRIDE:STRING=${BINDIR}/UserMakeRules.cmake
+CMAKE_BUILD_TYPE:STRING=Release
+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
FORM_LIBRARY:FILEPATH=/usr/lib/libform.a")
-set(USER_MAKE_RULES "SET(CMAKE_DL_LIBS \"-Bdynamic -ldl -Bstatic\")"
-include(release_cmake.cmake)
+set(USER_MAKE_RULE_FILE_CONTENTS
+ "SET(CMAKE_DL_LIBS \\\\\"-Bdynamic -ldl -Bstatic\\\\\")")
+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
index 42f06df..8ecf987 100644
--- a/Utilities/Release/hythloth_release.cmake
+++ b/Utilities/Release/hythloth_release.cmake
@@ -1,4 +1,8 @@
set(PROCESSORS 2)
set(HOST hythloth)
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)
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake
index 7232131..277ab71 100644
--- a/Utilities/Release/release_cmake.cmake
+++ b/Utilities/Release/release_cmake.cmake
@@ -1,5 +1,9 @@
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)
set(PROCESSORS 1)
endif(NOT DEFINED PROCESSORS)
@@ -23,7 +27,6 @@ macro(remote_command comment command)
else(${ARGC} GREATER 2)
execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result)
endif(${ARGC} GREATER 2)
- message("${result}")
if(${result} GREATER 0)
message(FATAL_ERROR "Error running command: ${command}, return value = ${result}")
endif(${result} GREATER 0)
@@ -33,18 +36,30 @@ endmacro(remote_command)
remote_command(
"remove and create working directory ~/CMakeReleaseDirectory"
"rm -rf ~/CMakeReleaseDirectory && mkdir ~/CMakeReleaseDirectory")
+# create user make rule file
+if(DEFINED USER_MAKE_RULE_FILE_CONTENTS)
+ remote_command("Create ${USER_MAKE_RULE_FILE}"
+ "echo ${USER_MAKE_RULE_FILE_CONTENTS} > ${USER_MAKE_RULE_FILE}" )
+endif(DEFINED USER_MAKE_RULE_FILE_CONTENTS)
+
+# create the build directory
+remote_command(
+ "Create a directory to build in"
+ "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" cmake_login)
+ "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")
-# create the build directory
-remote_command(
- "Create a directory to build in"
- "rm -rf ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && mkdir ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build")
# now bootstrap cmake
remote_command(
"Run cmake bootstrap --parallel=${PROCESSORS}"
@@ -61,6 +76,7 @@ remote_command(
remote_command(
"Run cmake tests"
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ${MAKE} test")
+
# package cmake with self-extracting shell script
remote_command(
"Package cmake"
@@ -69,10 +85,9 @@ remote_command(
remote_command(
"Package cmake"
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ./bin/cpack -G TGZ")
-
message("copy the .gz file back from the machine")
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz .
RESULT_VARIABLE result)
-message("copy the .sh file back from the machine")
-execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.sh .
+message("copy the ${INSTALLER_SUFFIX} file back from the machine")
+execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/${INSTALLER_SUFFIX} .
RESULT_VARIABLE result)