Forráskód Böngészése

ENH: getting better

Bill Hoffman 19 éve
szülő
commit
86beb67afd

+ 10 - 0
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)

+ 18 - 8
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)

+ 5 - 1
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)

+ 25 - 10
Utilities/Release/release_cmake.cmake

@@ -1,5 +1,9 @@
 set(CVSROOT ":pserver:[email protected]:/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)