From 231ac048aac9c2208c4a307929112edcc1c31e40 Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Tue, 8 Sep 2015 22:54:57 +0200 Subject: CMake: Use project directory to look for Git revision. If downloading Neovim as a tarball (i.e. without Git data), building Neovim will search parent directories for a .git directory. Explicitly set GIT_DIR to the project directory to avoid that. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c18d8982e9..1c637ced90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ endif() # Version tokens include(GetGitRevisionDescription) +file(TO_NATIVE_PATH ${CMAKE_CURRENT_LIST_DIR}/.git GIT_DIR) get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT) if(NOT NVIM_VERSION_COMMIT) set(NVIM_VERSION_COMMIT "?") -- cgit