From b3a579d8e2d8bee77cf43b4e9f993e10576af61f Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 15 Feb 2023 00:33:51 +0100 Subject: Version hash now has asterix if dirty repo was used to build --- cmake/modules/generate_version_file.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cmake') diff --git a/cmake/modules/generate_version_file.cmake b/cmake/modules/generate_version_file.cmake index 4479855..bbe34c6 100644 --- a/cmake/modules/generate_version_file.cmake +++ b/cmake/modules/generate_version_file.cmake @@ -4,8 +4,16 @@ execute_process( OUTPUT_VARIABLE PARSE_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE ) +execute_process( + COMMAND git status --porcelain + OUTPUT_VARIABLE STATUS_OUTPUT + OUTPUT_STRIP_TRAILING_WHITESPACE +) if(NOT PARSE_RESULT) set(HASH "${PARSE_OUTPUT}") + if(NOT ${STATUS_OUTPUT}) + set(HASH "${HASH}*") + endif() else() set(HASH "NOTFOUND") endif() -- cgit v1.1