Commit 6e090073 authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

UPDATED better information about the current build name visible on cdash

parent b1cb5625
......@@ -4,17 +4,17 @@
# Run this script to simulate a Nightly build similarly to:
#
# # define parameters
# SITE=$(hostname)-$(git rev-parse --abbrev-ref HEAD) # the name of the current machine
# CAMITK_SOURCE_DIR=~/Dev/CamiTK/src/camitk # path to CamiTK code source directory
# CAMITK_BUILD_DIR=~/Dev/CamiTK/build/camitk-exp # path to the intended build directory
# COMPILER_CONFIG="GCC-64bits-Debug" # compiler-arch-buildtype string
# SITE=$(hostname) # the name of the current machine
# CAMITK_SOURCE_DIR=~/Dev/CamiTK/src/camitk # path to CamiTK code source directory
# CAMITK_BUILD_DIR=~/Dev/CamiTK/build/camitk-exp # path to the intended build directory
# COMPILER_CONFIG="GCC-64bits-Debug" # compiler-arch-buildtype string
# # run the command
# ctest -VV \
# -DCTEST_SITE="$SITE" \
# -DCAMITK_CONTINUOUS_INTEGRATION="$COMPILER_CONFIG" \
# -DCTEST_SOURCE_DIRECTORY="$CAMITK_SOURCE_DIR" \
# -DCTEST_BINARY_DIRECTORY="$CAMITK_BUILD_DIR" \
# -S $CAMITK_SOURCE_DIR/sdk/cmake/ctest/experimental.cmake
# -S $CAMITK_SOURCE_DIR/sdk/cmake/ctest/experimental.cmake > log.txt 2>&1
#
# It will submit a new report in the "experimental" section of the dashboard
# identified as $SITE and $COMPILER_CONFIG.
......@@ -59,7 +59,21 @@ endif()
# Compose with those variables the CTest required ones.
site_name(CTEST_SITE)
set( CTEST_BUILD_NAME ${CAMITK_CONTINUOUS_INTEGRATION})
# get the git hash
find_package(Git QUIET)
if(GIT_FOUND)
include("${CTEST_SOURCE_DIRECTORY}/sdk/cmake/modules/macros/GetGitInfo.cmake")
set(CMAKE_SOURCE_DIR ${CTEST_SOURCE_DIRECTORY})
get_git_info(${CTEST_SOURCE_DIRECTORY})
set(CURRENT_GIT_HASH ${CAMITK_GIT_ABBREVIATED_HASH})
else()
set(CURRENT_GIT_HASH "???")
endif()
# set the build name using the compiler and commit hash
set(CTEST_BUILD_NAME ${CAMITK_CONTINUOUS_INTEGRATION}-${CURRENT_GIT_HASH})
if(UNIX)
set( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
elseif(WIN32)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment