aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLuminarys <kizunanohikari@gmail.com>2015-08-26 09:14:32 -0500
committerLuminarys <kizunanohikari@gmail.com>2015-08-26 09:14:32 -0500
commit429fc53e51bdbdbfc23894993f6ae170ff518fb6 (patch)
treed065f1d164dfa336487eeb26a9b42002fb5a907f /CMakeLists.txt
parent38cfdf99f4c7cdf3e81a4b32fb8ccaf522c84e73 (diff)
Minor fixes
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 1 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe424728..3e639e1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,12 +7,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMake)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
execute_process(
- COMMAND git log -1 --format=%h
+ COMMAND git describe --always
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
-else(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
- set(GIT_COMMIT_HASH "Not Found")
endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
SET(GIT_VERSION_FLAG "-DSWAY_GIT_VERSION=\"${GIT_COMMIT_HASH}\"")