restore revinfo
authorkoda
Tue, 21 Jan 2014 23:57:34 +0100
changeset 10045 2ca144d2a42f
parent 10044 33e64afccd3b
child 10046 cad4cabe79ca
restore revinfo
cmake_modules/revinfo.cmake
--- a/cmake_modules/revinfo.cmake	Tue Jan 21 23:53:26 2014 +0100
+++ b/cmake_modules/revinfo.cmake	Tue Jan 21 23:57:34 2014 +0100
@@ -1,7 +1,7 @@
 #detect Mercurial revision and init rev/hash information
 find_program(HGCOMMAND hg)
 find_program(GITCOMMAND git)
-if(EXISTS ${CMAKE_SOURCE_DIR}/.hg AND HGCOMMAND)
+if(EXISTS ${CMAKE_SOURCE_DIR}/.hg AND HGCOMMAND AND NOT NOVERSIONINFOUPDATE)
     execute_process(COMMAND ${HGCOMMAND} identify -in
                     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
                     OUTPUT_VARIABLE internal_version
@@ -21,7 +21,7 @@
 
     #write down hash and rev for easy picking should hg be missing
     file(WRITE "${CMAKE_SOURCE_DIR}/share/version_info.txt" "Hedgewars versioning information, do not modify\nrev ${HEDGEWARS_REVISION}\nhash ${HEDGEWARS_HASH}\n")
-elseif(EXISTS ${CMAKE_SOURCE_DIR}/.git AND GITCOMMAND)
+elseif(EXISTS ${CMAKE_SOURCE_DIR}/.git AND GITCOMMAND AND NOT NOVERSIONINFOUPDATE)
     execute_process(COMMAND ${GITCOMMAND} rev-parse --short HEAD
                     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
                     OUTPUT_VARIABLE HEDGEWARS_HASH