diff --git a/cmake/BuildVersion.cmake b/cmake/BuildVersion.cmake index cdfa520..aa20d50 100644 --- a/cmake/BuildVersion.cmake +++ b/cmake/BuildVersion.cmake @@ -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() diff --git a/tools/osmctools b/tools/osmctools index 45bb767..189f70d 160000 --- a/tools/osmctools +++ b/tools/osmctools @@ -1 +1 @@ -Subproject commit 45bb767d7939aaca39901d494c080fc4e7916ba7 +Subproject commit 189f70dec11a1a5411d012ad5254be58ea7bbcae