summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-11-19 10:15:17 -0800
committerGitHub <noreply@github.com>2019-11-19 10:15:17 -0800
commitcdd59d17d89a4fa7f2bb663de78fb38317e26409 (patch)
tree925652416b14dfd4d30e5bfaf36bfa0ffe07a4a9 /CMakeLists.txt
parent43fef7d1c31f5b99ff9f1e79ce368fe139414882 (diff)
downloadwabt-cdd59d17d89a4fa7f2bb663de78fb38317e26409.tar.gz
wabt-cdd59d17d89a4fa7f2bb663de78fb38317e26409.tar.bz2
wabt-cdd59d17d89a4fa7f2bb663de78fb38317e26409.zip
Fix for failing `git describe` in CMakeLists.txt (#1234)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 451a8a6c..1d4d54c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,11 +76,11 @@ EXECUTE_PROCESS(COMMAND
GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
-IF(${GIT_HASH_RESULT})
+IF(${GIT_HASH_RESULT} EQUAL 0)
+ SET(WABT_VERSION_INFO "${GIT_HASH}")
+ELSE()
MESSAGE(WARNING "Error running git describe to determine version")
SET(WABT_VERSION_INFO "(unable to determine version)")
-ELSE()
- SET(WABT_VERSION_INFO "${GIT_HASH}")
ENDIF()
configure_file(