aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnan Ajmain <3nan.ajmain@gmail.com>2023-01-18 16:48:01 +0600
committerGitHub <noreply@github.com>2023-01-18 11:48:01 +0100
commit7f7b83baef87b049b8779061065046ee161e2d7c (patch)
treeeb80da24916f99f20550cbd09b3a80031d13e47e
parent36555730daaac8a9b88878a869c0cef6d5b701f0 (diff)
downloadrneovim-7f7b83baef87b049b8779061065046ee161e2d7c.tar.gz
rneovim-7f7b83baef87b049b8779061065046ee161e2d7c.tar.bz2
rneovim-7f7b83baef87b049b8779061065046ee161e2d7c.zip
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.
-rw-r--r--cmake/GenerateVersion.cmake3
1 files changed, 3 insertions, 0 deletions
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()