diff options
Diffstat (limited to 'build_files/cmake/buildinfo.cmake')
-rw-r--r-- | build_files/cmake/buildinfo.cmake | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake index c1d21c413dc..245d7472158 100644 --- a/build_files/cmake/buildinfo.cmake +++ b/build_files/cmake/buildinfo.cmake @@ -2,12 +2,12 @@ # ./source/creator/CMakeLists.txt to write ./source/creator/buildinfo.h # Extract working copy information for SOURCE_DIR into MY_XXX variables -# with a default in case anything fails, for examble when using git-svn +# with a default in case anything fails, for example when using git-svn set(MY_WC_HASH "unknown") set(MY_WC_BRANCH "unknown") set(MY_WC_COMMIT_TIMESTAMP 0) -# Guess if this is a SVN working copy and then look up the revision +# Guess if this is a git working copy and then look up the revision if(EXISTS ${SOURCE_DIR}/.git) # The FindGit.cmake module is part of the standard distribution include(FindGit) @@ -60,7 +60,8 @@ if(EXISTS ${SOURCE_DIR}/.git) execute_process(COMMAND git log HEAD..@{u} WORKING_DIRECTORY ${SOURCE_DIR} OUTPUT_VARIABLE _git_below_check - OUTPUT_STRIP_TRAILING_WHITESPACE) + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET) if(NOT _git_below_check STREQUAL "") # If there're commits between HEAD and upstream this means # that we're reset-ed to older revision. Use it's hash then. @@ -106,7 +107,7 @@ if(EXISTS ${SOURCE_DIR}/.git) if(NOT _git_changed_files STREQUAL "") set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)") else() - # Unpushed commits are also considered local odifications + # Unpushed commits are also considered local modifications execute_process(COMMAND git log @{u}.. WORKING_DIRECTORY ${SOURCE_DIR} OUTPUT_VARIABLE _git_unpushed_log @@ -123,7 +124,7 @@ if(EXISTS ${SOURCE_DIR}/.git) endif() # BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake -# but BUILD_DATE and BUILD_TIME are plataform dependant +# but BUILD_DATE and BUILD_TIME are platform dependent if(UNIX) execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE) |