summaryrefslogtreecommitdiff
path: root/lapack_build.cmake
diff options
context:
space:
mode:
authorHans Johnson <hans-johnson@uiowa.edu>2016-07-27 12:22:19 (GMT)
committerHans Johnson <hans-johnson@uiowa.edu>2016-07-27 13:01:36 (GMT)
commit2244f8ed571e199e7783b4c6dc23d14e59b00c44 (patch)
treed57ca0c17c82697fe4f8a00ebb105bf12a71233f /lapack_build.cmake
parent094201f4063d62d41363dd869a4d6e64cb987fde (diff)
downloadlapack-2244f8ed571e199e7783b4c6dc23d14e59b00c44.zip
lapack-2244f8ed571e199e7783b4c6dc23d14e59b00c44.tar.gz
lapack-2244f8ed571e199e7783b4c6dc23d14e59b00c44.tar.bz2
COMP: Move to git for cdash testing
This commit resolves #11 by providing ctest script that pulls from github for running the nightly dashboards that are displayed at http://my.cdash.org/index.php?project=LAPACK
Diffstat (limited to 'lapack_build.cmake')
-rw-r--r--lapack_build.cmake53
1 files changed, 38 insertions, 15 deletions
diff --git a/lapack_build.cmake b/lapack_build.cmake
index a9012b3..66de6c8 100644
--- a/lapack_build.cmake
+++ b/lapack_build.cmake
@@ -1,4 +1,10 @@
-cmake_minimum_required(VERSION 2.8.7)
+##
+## HINTS: ctest -Ddashboard_model=Continuous -S $(pwd)/lapack/lapack_build.cmake
+## HINTS: ctest -Ddashboard_model=Experimental -S $(pwd)/lapack/lapack_build.cmake
+## HINTS: ctest -Ddashboard_model=Nightly -S $(pwd)/lapack/lapack_build.cmake
+##
+
+cmake_minimum_required(VERSION 2.8.10)
###################################################################
# The values in this section must always be provided
###################################################################
@@ -72,13 +78,10 @@ if(NOT DEFINED parallel)
set(parallel 1)
endif()
-# find CVS
-find_program(SVN svn PATHS $ENV{HOME}/bin /vol/local/bin)
-if(NOT SVN)
- message(FATAL_ERROR "SVN not found")
-endif()
+find_package(Git REQUIRED)
-set(CTEST_UPDATE_COMMAND ${SVN})
+set(CTEST_GIT_COMMAND ${GIT_EXECUTABLE})
+set(CTEST_UPDATE_COMMAND ${GIT_EXECUTABLE})
macro(getuname name flag)
exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
string(REGEX REPLACE "[/\\\\+<> #]" "-" "${name}" "${${name}}")
@@ -108,9 +111,8 @@ endif()
set(BUILDNAME "${osname}${osver}${osrel}${cpu}-${compiler}")
message("BUILDNAME: ${BUILDNAME}")
-# this is the cvs module name that should be checked out
-set (CTEST_MODULE_NAME lapack)
-set (CTEST_DIR_NAME "${CTEST_MODULE_NAME}SVN")
+# this is the module name that should be checked out
+set (CTEST_DIR_NAME "lapackGIT")
# Settings:
message("NOSPACES = ${NOSPACES}")
@@ -123,12 +125,25 @@ set(CTEST_SITE "${hostname}")
set(CTEST_BUILD_NAME "${BUILDNAME}")
set(CTEST_TEST_TIMEOUT "36000")
-# CVS command and the checkout command
+# GIT command and the checkout command
+# Select Git source to use.
+if(NOT DEFINED dashboard_git_url)
+ set(dashboard_git_url "https://github.com/Reference-LAPACK/lapack.git")
+endif()
+if(NOT DEFINED dashboard_git_branch)
+ set(dashboard_git_branch master)
+endif()
+
if(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${CTEST_DIR_NAME}")
set(CTEST_CHECKOUT_COMMAND
- "\"${CTEST_UPDATE_COMMAND}\" co https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk ${CTEST_DIR_NAME}")
+ "\"${CTEST_UPDATE_COMMAND}\" clone ${dashboard_git_url} ${CTEST_DIR_NAME}")
endif()
+# Explicitly specify the remote as "origin". This ensure we are pulling from
+# the correct remote and prevents command failures when the git tracking
+# branch has not been configured.
+set(CTEST_GIT_UPDATE_CUSTOM "${CTEST_GIT_COMMAND}" pull origin ${dashboard_git_branch})
+
# Set the generator and build configuration
if(NOT DEFINED CTEST_CMAKE_GENERATOR)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
@@ -161,7 +176,7 @@ set(CTEST_NOTES_FILES "${CTEST_NOTES_FILES}"
)
# check for parallel
-if(parallel GREATER 10)
+if(parallel GREATER 1 )
if(NOT CTEST_BUILD_COMMAND)
set(CTEST_BUILD_COMMAND "make -j${parallel} -i")
endif()
@@ -179,7 +194,7 @@ set( CACHE_CONTENTS "
SITE:STRING=${hostname}
BUILDNAME:STRING=${BUILDNAME}
DART_ROOT:PATH=
-SVNCOMMAND:FILEPATH=${CTEST_UPDATE_COMMAND}
+GITCOMMAND:FILEPATH=${CTEST_UPDATE_COMMAND}
DROP_METHOD:STRING=https
DART_TESTING_TIMEOUT:STRING=${CTEST_TEST_TIMEOUT}
# Enable LAPACKE
@@ -203,8 +218,16 @@ message("CTest command: ${CTEST_COMMAND}")
# any quotes inside of this string if you use it
file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "${CACHE_CONTENTS}")
+# Select the model (Nightly, Experimental, Continuous).
+if(NOT DEFINED dashboard_model)
+ set(dashboard_model Nightly)
+endif()
+if(NOT "${dashboard_model}" MATCHES "^(Nightly|Experimental|Continuous)$")
+ message(FATAL_ERROR "dashboard_model must be Nightly, Experimental, or Continuous")
+endif()
+
message("Start dashboard...")
-ctest_start(Nightly)
+ctest_start(${dashboard_model})
#ctest_start(Experimental)
message(" Update")
ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)