Skip to content

Commit

Permalink
Let the git id be more accurate, regarding the "dirty" mark.
Browse files Browse the repository at this point in the history
  • Loading branch information
krono committed Aug 15, 2012
1 parent 077add4 commit e18fb4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions vm/cmake/configureVmDate.cmake.in
Expand Up @@ -2,7 +2,7 @@
set(WIN32 @WIN32@)
set(UNIX @UNIX@)
set(PLATFORM "@platform_name@ @platform_processor@")
set(GIT_DIR "@CMAKE_CURRENT_SOURCE_DIR@/../.git/")
set(GIT_DIR "@CMAKE_CURRENT_SOURCE_DIR@/..")
set(IN_FILE "@SRC_VMDATE_IN@")
set(OUT_FILE "@SRC_VMDATE@")

Expand Down Expand Up @@ -44,7 +44,8 @@ execute_process(COMMAND git --version
if(_git_not_there)
set(GIT_REVISION "")
else()
execute_process(COMMAND git --git-dir=${GIT_DIR} describe --tags --dirty
execute_process(COMMAND git describe --tags --dirty
WORKING_DIRECTORY "${GIT_DIR}"
RESULT_VARIABLE git_result
OUTPUT_VARIABLE GIT_REVISION
ERROR_VARIABLE GIT_REVISION
Expand All @@ -60,4 +61,4 @@ endif()
# PLATFORM
# GIT_REVISION

configure_file("${IN_FILE}" "${OUT_FILE}")
configure_file("${IN_FILE}" "${OUT_FILE}")
3 changes: 2 additions & 1 deletion vm/cmake/functions.cmake
Expand Up @@ -25,7 +25,8 @@ function(determine_build_information buildVar)
if(_git_not_there)
set(${buildVar} PARENT_SCOPE)
else()
execute_process(COMMAND git --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/../.git describe --tags --dirty
execute_process(COMMAND git describe --tags --dirty
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.."
RESULT_VARIABLE git_result
OUTPUT_VARIABLE _revision
ERROR_VARIABLE _error
Expand Down

0 comments on commit e18fb4d

Please sign in to comment.