Geocore version

This commit is contained in:
LaGrunge 2019-09-30 18:49:44 +03:00 committed by cc-engineering
parent 48efc50e88
commit 4f5d44b8c4
2 changed files with 15 additions and 9 deletions

View file

@ -45,14 +45,20 @@ endfunction()
function(configure_build_version_hpp) function(configure_build_version_hpp)
message(STATUS "Configure build version ...") message(STATUS "Configure build version ...")
set(GIT_HASH "") if ((DEFINED ENV{GIT_HASH}) AND (DEFINED ENV{GIT_TIMESTAMP}) AND (DEFINED ENV{VERSION}))
set(GIT_TIMESTAMP "0") set(GIT_HASH $ENV{GIT_HASH})
set(GIT_TAG "") set(GIT_TIMESTAMP $ENV{GIT_TIMESTAMP})
find_package(Git) set(GIT_TAG $ENV{VERSION})
if (GIT_FOUND) else ()
get_last_git_commit_hash(GIT_HASH) set(GIT_HASH "")
get_last_git_commit_timestamp(GIT_TIMESTAMP) set(GIT_TIMESTAMP "0")
get_git_tag_name(GIT_TAG) 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() endif()
configure_file("${PATH_WITH_BUILD_VERSION_HPP}/build_version.hpp.in" "${MAPSME_CURRENT_PROJECT_ROOT}/build_version.hpp" @ONLY) configure_file("${PATH_WITH_BUILD_VERSION_HPP}/build_version.hpp.in" "${MAPSME_CURRENT_PROJECT_ROOT}/build_version.hpp" @ONLY)
endfunction() endfunction()

@ -1 +1 @@
Subproject commit 45bb767d7939aaca39901d494c080fc4e7916ba7 Subproject commit 189f70dec11a1a5411d012ad5254be58ea7bbcae