Module: kamailio Branch: master Commit: 170ddcca96b3ee11f4daed1592f0cee9c753db2b URL: https://github.com/kamailio/kamailio/commit/170ddcca96b3ee11f4daed1592f0cee9...
Author: Xenofon Karamanos xk@gilawa.com Committer: Xenofon Karamanos xk@gilawa.com Date: 2024-12-12T11:19:48Z
cmake: Add option to not use git to gather commit info
---
Modified: src/CMakeLists.txt
---
Diff: https://github.com/kamailio/kamailio/commit/170ddcca96b3ee11f4daed1592f0cee9... Patch: https://github.com/kamailio/kamailio/commit/170ddcca96b3ee11f4daed1592f0cee9...
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 30f80f0db32..2b02f33098f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,9 +24,13 @@ include(${CMAKE_SOURCE_DIR}/cmake/defs.cmake)
# ----------------------- # The following produces core/autover.h Find Git +option(USE_GIT "Use git to get commit information" ON) find_package(Git QUIET)
-if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") +if(USE_GIT + AND GIT_FOUND + AND EXISTS "${PROJECT_SOURCE_DIR}/.git" +) execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --verify --short=6 HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}