From 7f7b83baef87b049b8779061065046ee161e2d7c Mon Sep 17 00:00:00 2001 From: Enan Ajmain <3nan.ajmain@gmail.com> Date: Wed, 18 Jan 2023 16:48:01 +0600 Subject: build(Windows): fix redoing version generation (#21880) Problem: On Windows, neovim's version is generated every time nvim is built, even if code hasn't been changed. That is because version generation is done based on a hash matching of a file and the content of the file. And in Windows they don't match, because of the DOS line-endings. Solution: Write the file containing nvim version with UNIX line-endings. --- cmake/GenerateVersion.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmake') diff --git a/cmake/GenerateVersion.cmake b/cmake/GenerateVersion.cmake index 8cea39e4de..34993d9552 100644 --- a/cmake/GenerateVersion.cmake +++ b/cmake/GenerateVersion.cmake @@ -33,4 +33,7 @@ endif() if(NOT "${NVIM_VERSION_HASH}" STREQUAL "${CURRENT_VERSION_HASH}") message(STATUS "Using NVIM_VERSION: ${NVIM_VERSION}") file(WRITE "${OUTPUT}" "${NVIM_VERSION_STRING}") + if(WIN32) + configure_file("${OUTPUT}" "${OUTPUT}" NEWLINE_STYLE UNIX) + endif() endif() -- cgit