Commit a1a83e8f authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

UPDATED improved ctest build name in nightly and continuous as well

parent 6e090073
......@@ -39,7 +39,20 @@ 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)
......@@ -81,7 +94,7 @@ endif()
# Update source code and send reports
set( CTEST_UPDATE_COMMAND "git")
find_program(CTEST_GIT_COMMAND git)
set(CTEST_GIT_COMMAND ${GIT_EXECUTABLE})
set(CTEST_UPDATE_COMMAND ${CTEST_GIT_COMMAND})
# CMake configuration (put here all the configure flags)
......
......@@ -36,7 +36,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)
......@@ -77,8 +91,7 @@ else()
endif()
# Update source code and send reports
set( CTEST_UPDATE_COMMAND "git")
find_program(CTEST_GIT_COMMAND git)
set(CTEST_GIT_COMMAND ${GIT_EXECUTABLE})
if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone https://forge.imag.fr/anonscm/git/camitk/camitk.git ${CTEST_SOURCE_DIRECTORY}")
......
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