Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-07-19 02:51:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-19 02:51:49 +0300
commit1e10e4e2e319ca764d49bb625574e01cd643288b (patch)
tree372edca74139dcd83f61c146b2c7fbce6e9fd17c
parent4bca8a6bc5fe34b7c7c58cbdbc3454bfc444d5be (diff)
Fix error when getting the commit time fails
While this should work, allow the build to succeed if for some reason the command fails.
-rw-r--r--build_files/cmake/buildinfo.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake
index 74c1f8f1f8e..756928a8448 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -97,6 +97,10 @@ if(EXISTS ${SOURCE_DIR}/.git)
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
+ # May fail in rare cases
+ if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
+ set(MY_WC_COMMIT_TIMESTAMP 0)
+ endif()
# Update GIT index before getting dirty files
execute_process(COMMAND git update-index -q --refresh