commit ba662efb177aa3e6b21bd4dbb6511c895eab9af0
parent 3ded2ab55a1d894234163f82ced026e1423c9915
Author: ii14 <ii14@users.noreply.github.com>
Date: Tue, 26 Jul 2022 02:03:13 +0200
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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}"