]> https://gitweb.dealii.org/ - dealii.git/commitdiff
change output format and pattern matching 13408/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 18 Feb 2022 08:57:07 +0000 (02:57 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 18 Feb 2022 08:57:07 +0000 (02:57 -0600)
cmake/macros/macro_deal_ii_query_git_information.cmake

index e3703c6beeb459c9392053dce9da0c42e93cbf95..fb3458953bf052b17d8c5412bd265447837839eb 100644 (file)
@@ -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}")
 
       #

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.