Skip to content

Commit

Permalink
CTest: add Vc version string to build name
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Kretz <kretz@kde.org>
  • Loading branch information
mattkretz committed Jan 18, 2017
1 parent 1614740 commit 1d7681c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,13 @@ endif()

# Build the CTEST_BUILD_NAME string
################################################################################
file(STRINGS "${CTEST_SOURCE_DIRECTORY}/include/Vc/version.h"
Vc_VERSION_STRING
REGEX "#define +Vc_VERSION_STRING "
)
string(REGEX REPLACE "\"$" "" Vc_VERSION_STRING "${Vc_VERSION_STRING}")
string(REGEX REPLACE "^.*\"" "" Vc_VERSION_STRING "${Vc_VERSION_STRING}")

if(DEFINED target_architecture)
set(tmp ${target_architecture})
else()
Expand All @@ -286,7 +293,7 @@ elseif(build_type STREQUAL "None")
else()
set(build_type_short "${build_type}")
endif()
string(STRIP "${git_branch} ${COMPILER_VERSION} ${CXXFLAGS} ${build_type_short} ${tmp} ${chip} ${os_ident}" CTEST_BUILD_NAME)
string(STRIP "${Vc_VERSION_STRING} ${git_branch} ${COMPILER_VERSION} ${CXXFLAGS} ${build_type_short} ${tmp} ${chip} ${os_ident}" CTEST_BUILD_NAME)
if(DEFINED subset)
set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ${subset}")
endif()
Expand Down

0 comments on commit 1d7681c

Please sign in to comment.