cmake_modules/revinfo.cmake
changeset 10025 ec966363adbe
parent 9937 948f48b29360
child 15474 6e09555b25b4
--- a/cmake_modules/revinfo.cmake	Mon Jan 20 10:16:29 2014 +0100
+++ b/cmake_modules/revinfo.cmake	Mon Jan 20 10:40:59 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