Private
Public Access
2
0

cmake: fix version when git is pesent but no tree is found

This avoids the version being .so.HEAD-HASH-NOTFOUND or similar when git is
present on the target but a valid tree is not found

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2015-06-16 11:12:16 +01:00
parent c9cfcb2cae
commit a44c5851cc

View File

@@ -16,7 +16,7 @@ set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_
# Make a version file containing the current version from git.
include (GetGitRevisionDescription)
git_describe (VERSION "--tags")
if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND")
if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_HEAD-HASH-NOTFOUND")
message (WARNING " - Install git to compile a production libmraa!")
set (VERSION "v0.7.2-dirty")
endif ()