From 9f4324eba58e3119554ea0cbddc6386ffead9c76 Mon Sep 17 00:00:00 2001 From: mquinson Date: Wed, 23 Dec 2009 20:23:53 +0000 Subject: [PATCH] Include the svn version in the build name git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6984 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- buildtools/Cmake/CTestConfig.cmake | 10 +++++++--- buildtools/scripts/test_dist_with_cmake.sh | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/buildtools/Cmake/CTestConfig.cmake b/buildtools/Cmake/CTestConfig.cmake index b9e672420a..f7da28faf0 100644 --- a/buildtools/Cmake/CTestConfig.cmake +++ b/buildtools/Cmake/CTestConfig.cmake @@ -18,23 +18,27 @@ exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}") endmacro(getuname) MARK_AS_ADVANCED(UNAME) +find_program(CAT NAMES cat) +exec_program("${CAT}" ARGS "version" OUTPUT_VARIABLE VERSION) + + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") SET(DISTRIB2 "OSX") else(CMAKE_SYSTEM_NAME STREQUAL "Darwin") #Try to get the distrib - find_program(CAT NAMES cat) exec_program("${CAT}" ARGS " /etc/issue" OUTPUT_VARIABLE DISTRIB) MARK_AS_ADVANCED(CAT) - STRING(REPLACE "\\n \\l" "" DISTRIB2 ${DISTRIB}) endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + +STRING(REPLACE "\\n \\l" "" DISTRIB2 ${DISTRIB}) getuname(osname -s) getuname(node -n) getuname(osrel -r) getuname(cpu -m) -SET (BUILDNAME "${osname}-${DISTRIB2}-${cpu}") +SET (BUILDNAME "${VERSION}-${osname}-${DISTRIB2}-${cpu}") SET (SITE "${node}") SET (CTEST_PROJECT_NAME "Simgrid") SET (CTEST_DROP_METHOD "http") diff --git a/buildtools/scripts/test_dist_with_cmake.sh b/buildtools/scripts/test_dist_with_cmake.sh index c77737c638..124dc1917a 100755 --- a/buildtools/scripts/test_dist_with_cmake.sh +++ b/buildtools/scripts/test_dist_with_cmake.sh @@ -9,6 +9,7 @@ else fi set -e +get_version open_archive # Make sure we have cmake installed @@ -26,7 +27,8 @@ fi # Launch CMake cd buildtools/Cmake +echo $version > version cmake ./ # Run CTest, and push the results -ctest -D Experimental CTEST_FULL_OUTPUT +ctest -D Experimental -- 2.20.1