From f1102162b771c4fbe64b3721dbabac020994e757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 18 Oct 2019 19:39:23 +0200 Subject: [PATCH] Add dirty warning to version Cmake --- version/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/version/CMakeLists.txt b/version/CMakeLists.txt index 92469be..2386646 100644 --- a/version/CMakeLists.txt +++ b/version/CMakeLists.txt @@ -29,4 +29,8 @@ execute_process(COMMAND bash ./generate-git-commit-string.sh OUTPUT_VARIABLE GIT_COMMIT) message("${BoldGreen}Commit: ${GIT_COMMIT}") message("Version: ${GIT_VER}${ColorReset}") + +IF(GIT_VER MATCHES "-dirty") + message("${BoldRed}Build is dirty! Commit your changes before releasing this version!${ColorReset}") +ENDIF(GIT_VER MATCHES "-dirty") target_compile_definitions(version PRIVATE PROJECT_GIT_VERSION=${GIT_VER} PROJECT_GIT_COMMIT=${GIT_COMMIT})