From 790f8b0e167c7015f1486d4bcab0083f42017ac3 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Fri, 22 Jul 2022 16:10:24 +0200 Subject: fix(build): non-git ("tarball") build fails #19448 Problem: Build fails without git or .git/. ref #19289 Solution: Fix the version generation logic. Test cases: If `git` is missing: -- Using NVIM_VERSION_MEDIUM: v0.8.0-dev If `.git/` is missing: -- Git tag extraction failed: fatal: not a git repository (or any of the parent directories): .git -- Using NVIM_VERSION_MEDIUM: v0.8.0-dev If `git describe` fails -- Git tag extraction failed: fatal: ... -- Using NVIM_VERSION_MEDIUM: v0.8.0-dev Co-authored-by: Justin M. Keyes --- src/nvim/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 384e672529..49d5f8a677 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -229,6 +229,7 @@ add_custom_target(update_version_stamp -DNVIM_VERSION_PATCH=${NVIM_VERSION_PATCH} -DNVIM_VERSION_PRERELEASE=${NVIM_VERSION_PRERELEASE} -DOUTPUT=${NVIM_VERSION_GIT_H} + -DCMAKE_MESSAGE_LOG_LEVEL=${CMAKE_MESSAGE_LOG_LEVEL} -P ${PROJECT_SOURCE_DIR}/cmake/GenerateVersion.cmake WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} BYPRODUCTS ${NVIM_VERSION_GIT_H}) -- cgit