projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
399cac5
)
set GIT_HEAD and GIT_DESCRIBE from environment
author
Alf Gaida
<agaida@siduction.org>
Sat, 10 Jan 2015 15:39:33 +0000
(16:39 +0100)
committer
Alf Gaida
<agaida@siduction.org>
Sat, 10 Jan 2015 15:39:33 +0000
(16:39 +0100)
CMakeLists.txt
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
f6e9f74
..
70b05c9
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-552,6
+552,17
@@
include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_HEAD)
git_describe(GIT_DESCRIBE --long)
get_git_head_revision(GIT_REFSPEC GIT_HEAD)
git_describe(GIT_DESCRIBE --long)
+# If not in a Git repo try to read GIT_HEAD and GIT_DESCRIBE from
+# enviroment
+if (NOT GIT_HEAD OR NOT GIT_DESCRIBE)
+ if (ENV_GIT_HEAD)
+ set(GIT_HEAD ${ENV_GIT_HEAD})
+ endif ()
+ if (ENV_GIT_DESCRIBE)
+ set(GIT_DESCRIBE ${ENV_GIT_DESCRIBE})
+ endif()
+endif()
+
# Sanitize things if we're not in a Git repo
if (NOT GIT_HEAD OR NOT GIT_DESCRIBE)
set(GIT_HEAD "")
# Sanitize things if we're not in a Git repo
if (NOT GIT_HEAD OR NOT GIT_DESCRIBE)
set(GIT_HEAD "")