From 695ba5d5db4051d7329f2d72b7ef0dfbbf9cbda6 Mon Sep 17 00:00:00 2001 From: lselter Date: Tue, 9 Jul 2024 14:34:23 +0100 Subject: [PATCH] Fix String substitution when `DEV` flavour is built with a dirty local version both instances of -D were replaced with commit count --- cmake/GetGitRevisionDescription.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/GetGitRevisionDescription.cmake b/cmake/GetGitRevisionDescription.cmake index 1bb2f945e..fdc7a1f10 100644 --- a/cmake/GetGitRevisionDescription.cmake +++ b/cmake/GetGitRevisionDescription.cmake @@ -240,7 +240,7 @@ function(git_describe_working_tree _var) set(out "${out}-${res}-NOTFOUND") endif() if( "${out}" MATCHES "-D\$") - STRING(REPLACE "-D" "-${COMMIT_COUNT}-D" out "${out}") + STRING(REGEX REPLACE "-D\$" "-${COMMIT_COUNT}-D" out "${out}") else() set(out "${out}-${COMMIT_COUNT}") endif()