summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-05-27 19:00:04 (GMT)
committerGitHub <noreply@github.com>2020-05-27 19:00:04 (GMT)
commit69c3be6e87cb483ff7c28f93538f243bea2f2fde (patch)
treec8b1b3043e3f04b99c4b72af27a5ccac07d2f52f /cmake
parent08c400ccc3eabae63f030b0c05c5f4b4762e3ad3 (diff)
parenta93deafa9c460aceb9ca87add52405e1f41cf14a (diff)
downloadDoxygen-69c3be6e87cb483ff7c28f93538f243bea2f2fde.zip
Doxygen-69c3be6e87cb483ff7c28f93538f243bea2f2fde.tar.gz
Doxygen-69c3be6e87cb483ff7c28f93538f243bea2f2fde.tar.bz2
Merge pull request #7776 from albert-github/feature/bug_git_in
Change of git version input file was not taken into account
Diffstat (limited to 'cmake')
-rw-r--r--cmake/git_watcher.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmake/git_watcher.cmake b/cmake/git_watcher.cmake
index 72b7852..ac34c1d 100644
--- a/cmake/git_watcher.cmake
+++ b/cmake/git_watcher.cmake
@@ -150,6 +150,19 @@ function(CheckGit _working_dir _state_changed _state)
# (Passing by reference in CMake is awkward...)
set(${_state} ${state} PARENT_SCOPE)
+ if(EXISTS "${POST_CONFIGURE_GIT_VERSION_FILE}")
+ if("${PRE_CONFIGURE_GIT_VERSION_FILE}" IS_NEWER_THAN "${POST_CONFIGURE_GIT_VERSION_FILE}")
+ file(REMOVE "${POST_CONFIGURE_GIT_VERSION_FILE}")
+ file(REMOVE "${GIT_STATE_FILE}")
+ set(${_state_changed} "true" PARENT_SCOPE)
+ return()
+ endif()
+ else()
+ file(REMOVE "${GIT_STATE_FILE}")
+ set(${_state_changed} "true" PARENT_SCOPE)
+ return()
+ endif()
+
# Check if the state has changed compared to the backup on disk.
if(EXISTS "${GIT_STATE_FILE}")
file(READ "${GIT_STATE_FILE}" OLD_HEAD_CONTENTS)