From: Matthias Maier Date: Fri, 18 Feb 2022 08:57:07 +0000 (-0600) Subject: change output format and pattern matching X-Git-Tag: v9.4.0-rc1~464^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77df4ab011f4a2a19f51e09327e1a1b4c8f400c9;p=dealii.git change output format and pattern matching --- diff --git a/cmake/macros/macro_deal_ii_query_git_information.cmake b/cmake/macros/macro_deal_ii_query_git_information.cmake index e3703c6bee..fb3458953b 100644 --- a/cmake/macros/macro_deal_ii_query_git_information.cmake +++ b/cmake/macros/macro_deal_ii_query_git_information.cmake @@ -84,18 +84,18 @@ MACRO(DEAL_II_QUERY_GIT_INFORMATION) # EXECUTE_PROCESS( - COMMAND ${GIT_EXECUTABLE} log -n 1 --pretty=format:"%H\;%h\;%cd" --date=iso-strict + COMMAND ${GIT_EXECUTABLE} log -n 1 --pretty=format:"revision=%H, shortrev=%h, date=%cd" --date=iso-strict WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE _info RESULT_VARIABLE _result OUTPUT_STRIP_TRAILING_WHITESPACE ) IF(${_result} EQUAL 0) - STRING(REGEX REPLACE "^\"([^;]+);([^;]+);([^;]+)\"$" + STRING(REGEX REPLACE "^\"revision=(.+), shortrev=(.+), date=(.+)\"$" "\\1" ${_prefix}GIT_REVISION "${_info}") - STRING(REGEX REPLACE "^\"([^;]+);([^;]+);([^;]+)\"$" + STRING(REGEX REPLACE "^\"revision=(.+), shortrev=(.+), date=(.+)\"$" "\\2" ${_prefix}GIT_SHORTREV "${_info}") - STRING(REGEX REPLACE "^\"([^;]+);([^;]+);([^;]+)\"$" + STRING(REGEX REPLACE "^\"revision=(.+), shortrev=(.+), date=(.+)\"$" "\\3" ${_prefix}GIT_TIMESTAMP "${_info}") #