Geocore version
This commit is contained in:
parent
48efc50e88
commit
4f5d44b8c4
2 changed files with 15 additions and 9 deletions
|
@ -45,14 +45,20 @@ endfunction()
|
|||
|
||||
function(configure_build_version_hpp)
|
||||
message(STATUS "Configure build version ...")
|
||||
set(GIT_HASH "")
|
||||
set(GIT_TIMESTAMP "0")
|
||||
set(GIT_TAG "")
|
||||
find_package(Git)
|
||||
if (GIT_FOUND)
|
||||
get_last_git_commit_hash(GIT_HASH)
|
||||
get_last_git_commit_timestamp(GIT_TIMESTAMP)
|
||||
get_git_tag_name(GIT_TAG)
|
||||
if ((DEFINED ENV{GIT_HASH}) AND (DEFINED ENV{GIT_TIMESTAMP}) AND (DEFINED ENV{VERSION}))
|
||||
set(GIT_HASH $ENV{GIT_HASH})
|
||||
set(GIT_TIMESTAMP $ENV{GIT_TIMESTAMP})
|
||||
set(GIT_TAG $ENV{VERSION})
|
||||
else ()
|
||||
set(GIT_HASH "")
|
||||
set(GIT_TIMESTAMP "0")
|
||||
set(GIT_TAG "")
|
||||
find_package(Git)
|
||||
if (GIT_FOUND)
|
||||
get_last_git_commit_hash(GIT_HASH)
|
||||
get_last_git_commit_timestamp(GIT_TIMESTAMP)
|
||||
get_git_tag_name(GIT_TAG)
|
||||
endif()
|
||||
endif()
|
||||
configure_file("${PATH_WITH_BUILD_VERSION_HPP}/build_version.hpp.in" "${MAPSME_CURRENT_PROJECT_ROOT}/build_version.hpp" @ONLY)
|
||||
endfunction()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 45bb767d7939aaca39901d494c080fc4e7916ba7
|
||||
Subproject commit 189f70dec11a1a5411d012ad5254be58ea7bbcae
|
Loading…
Add table
Reference in a new issue