[cmake,git] use normal configure_file
do not use our wrapper for multicongiguration builds for this as the git revision is not dependent on configuration.
This commit is contained in:
parent
9b9a04e2cc
commit
32d17e76df
@ -30,8 +30,6 @@
|
|||||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
# http://www.boost.org/LICENSE_1_0.txt)
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
include(CleaningConfigureFile)
|
|
||||||
|
|
||||||
if(__get_git_revision_description)
|
if(__get_git_revision_description)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
@ -65,9 +63,9 @@ function(get_git_head_revision _refspecvar _hashvar)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
set(HEAD_FILE "${GIT_DATA}/HEAD")
|
set(HEAD_FILE "${GIT_DATA}/HEAD")
|
||||||
cleaning_configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
|
configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
|
||||||
|
|
||||||
cleaning_configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
|
configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
|
||||||
"${GIT_DATA}/grabRef.cmake"
|
"${GIT_DATA}/grabRef.cmake"
|
||||||
@ONLY)
|
@ONLY)
|
||||||
include("${GIT_DATA}/grabRef.cmake")
|
include("${GIT_DATA}/grabRef.cmake")
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
# http://www.boost.org/LICENSE_1_0.txt)
|
# http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
include(CleaningConfigureFile)
|
|
||||||
|
|
||||||
set(HEAD_HASH)
|
set(HEAD_HASH)
|
||||||
|
|
||||||
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
|
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
|
||||||
@ -24,14 +22,14 @@ if(HEAD_CONTENTS MATCHES "ref")
|
|||||||
# named branch
|
# named branch
|
||||||
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
|
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
|
||||||
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
|
||||||
cleaning_configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||||
elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}")
|
elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}")
|
||||||
cleaning_configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
|
||||||
set(HEAD_HASH "${HEAD_REF}")
|
set(HEAD_HASH "${HEAD_REF}")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# detached HEAD
|
# detached HEAD
|
||||||
cleaning_configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
|
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT HEAD_HASH)
|
if(NOT HEAD_HASH)
|
||||||
|
Loading…
Reference in New Issue
Block a user