Add dirty warning to version Cmake
This commit is contained in:
parent
8bef6bcb17
commit
f1102162b7
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user