X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/720c7b751906a41d2cdcfae7c461d74907771037..821dabb138b78be6fd776ab047b024d319805012:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 1aa9c315..52bb9a01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,17 @@ set(NOMINATIM_VERSION "${NOMINATIM_VERSION_MAJOR}.${NOMINATIM_VERSION_MINOR}.${N add_definitions(-DNOMINATIM_VERSION="${NOMINATIM_VERSION}") +# Setting GIT_HASH +find_package(Git) +if (GIT_FOUND) + execute_process( + COMMAND "${GIT_EXECUTABLE}" log -1 --format=%h + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + OUTPUT_VARIABLE GIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) +endif() #----------------------------------------------------------------------------- # Configuration