-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: fix and harden Git version detection on Windows.
Same change as in Corrade.
- Loading branch information
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
This dir is used by `src/*/CMakeLists.txt` to run `git describe --match "v*"`. | ||
Because, if it would be run in that directory, on Windows the `--match "v*"` | ||
would get expanded to the `version.h.cmake` file there, causing Git to | ||
obviously not find any such tag. The reason is probably that on Windows the | ||
wildcard expansion is done on the application side and not by the shell, thus | ||
being performed even though CMake docs say `execute_process()` doesn't involve | ||
a shell. This directory is thus dedicated for that operation, *guaranteed* to | ||
never contain any file starting with `v` (or `V` for that matter because, | ||
again, HELLO WINDOWS). | ||
|
||
No matter what you do, DON'T put any files starting with `v` or `V` here, or | ||
hell breaks loose again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters