From 09a163d76e3b67d80185aa7c2f942d15c0c648ea Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 19 May 2012 23:25:06 +0200 Subject: [PATCH] Fixed: Revision 0 bug --- code/CMakeModules/GetRevision.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/CMakeModules/GetRevision.cmake b/code/CMakeModules/GetRevision.cmake index d38215aba..52f443d5f 100644 --- a/code/CMakeModules/GetRevision.cmake +++ b/code/CMakeModules/GetRevision.cmake @@ -48,13 +48,15 @@ IF(EXISTS "${ROOT_DIR}/.hg/") IF(MERCURIAL_FOUND) Mercurial_WC_INFO(${ROOT_DIR} ER) SET(REVISION ${ER_WC_REVISION}) + SET(CHANGESET ${ER_WC_CHANGESET}) + SET(BRANCH ${ER_WC_BRANCH}) ENDIF(MERCURIAL_FOUND) ENDIF(EXISTS "${ROOT_DIR}/.hg/") -IF(REVISION) +IF(DEFINED REVISION) IF(EXISTS ${SOURCE_DIR}/revision.h.in) NOW(BUILD_DATE) CONFIGURE_FILE(${SOURCE_DIR}/revision.h.in revision.h.txt) EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy revision.h.txt revision.h) # copy_if_different ENDIF(EXISTS ${SOURCE_DIR}/revision.h.in) -ENDIF(REVISION) +ENDIF(DEFINED REVISION)