From 9cff6c87f02a172ba091eea5f59b269fa4882b75 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 24 Sep 2025 13:00:02 +0500 Subject: [PATCH] cmake - don't fail silently with ADD_COMMIT_SHA and missing git --- cmake/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 25f9d1293d..059ebfbf10 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1305,6 +1305,10 @@ endif(BUILD_GEOMSERVER) if(ADD_COMMIT_SHA) find_package(Git) + if(NOT GIT_FOUND) + message(FATAL_ERROR "Failed to find Git for ADD_COMMIT_SHA option.") + endif() + if(GIT_FOUND) if (VERSION_OVERRIDE) set (git_branch ${RELEASE_VERSION})