From ba662efb177aa3e6b21bd4dbb6511c895eab9af0 Mon Sep 17 00:00:00 2001 From: ii14 Date: Tue, 26 Jul 2022 02:03:13 +0200 Subject: build: fix git version generation on makefiles with older cmake versions When using a Makefile generator, older CMake versions are not building custom targets when depending on their byproducts, making version generation fail. (works on 3.19.4, fails on 3.10.2) As a workaround, add a dependency on the custom target explicitly. --- src/nvim/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 4b8774e598..94b88da891 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -268,7 +268,7 @@ foreach(sfile ${NVIM_SOURCES} set(depends "${HEADER_GENERATOR}" "${sfile}") if("${f}" STREQUAL "version.c") # Ensure auto/versiondef_git.h exists after "make clean". - list(APPEND depends "${NVIM_VERSION_GIT_H}") + list(APPEND depends update_version_stamp "${NVIM_VERSION_GIT_H}") endif() add_custom_command( OUTPUT "${gf_c_h}" "${gf_h_h}" -- cgit