-
Notifications
You must be signed in to change notification settings - Fork 218
Open
Description
cmake-modules/GetGitRevisionDescription.cmake
Lines 3 to 4 in 1b45049
| # These functions force a re-configure on each git commit so that you can | |
| # trust the values of the variables in your build system. |
Where/how is that implemented?
It is insufficient to cause the git_describe_working_tree function to reliably generate (or not generate) the -dirty suffix. Ideally, it should also force a reconfigure when the git working tree status toggles between dirty/clean. (Or when such status has changed since the last cmake configure.)
To observe:
- Setup
- Set up a project with a target that captures the output of
git_describe_working_tree git commit- CMake configure & build. Note the captured version is clean (no
-dirtysuffix)
- Set up a project with a target that captures the output of
- False clean detection
- Modify a tracked source file. Git worktree status is now dirty.
- Build the project
- CMake does not automatically (re)configure
- Captured version is missing the
-dirtysuffix
- False dirty detection
- CMake configure (manually) & build
- Captured version now correctly contains the
-dirtysuffix
- Captured version now correctly contains the
git reset --hard. Build again- Captured version still (errantly) contains the
-dirtysuffix
- Captured version still (errantly) contains the
- CMake configure (manually) & build
@rpavlik, @dawid-aurobit (contributor of #41)
Metadata
Metadata
Assignees
Labels
No labels