| 1 |
Description: Do not override git-hash.txt with an empty string if we have a release tarball |
| 2 |
Author: Sébastien Noel <[email protected]> |
| 3 |
Forwarded: not-needed |
| 4 |
--- a/cmake/CheckGit.cmake |
| 5 |
+++ b/cmake/CheckGit.cmake |
| 6 |
@@ -1,5 +1,5 @@ |
| 7 |
# In case Git is not available, default is empty string |
| 8 |
|
| 9 |
+set(D3_GIT_HASH "") |
| 10 |
|
| 11 |
find_package(Git QUIET) |
| 12 |
if(GIT_FOUND) |
| 13 |
@@ -9,6 +9,8 @@ |
| 14 |
OUTPUT_STRIP_TRAILING_WHITESPACE |
| 15 |
ERROR_QUIET |
| 16 |
) |
| 17 |
+endif() |
| 18 |
+if(NOT D3_GIT_HASH STREQUAL "") |
| 19 |
file(WRITE ${SOURCE_DIR}/git-hash.txt ${D3_GIT_HASH}) |
| 20 |
else() |
| 21 |
# Try to read pregenerated file with commit hash on it (archive version of repository) |
| 22 |
|