diff options
author | Florian Walch <florian@fwalch.com> | 2015-09-08 22:54:57 +0200 |
---|---|---|
committer | Florian Walch <florian@fwalch.com> | 2015-09-08 22:54:57 +0200 |
commit | 231ac048aac9c2208c4a307929112edcc1c31e40 (patch) | |
tree | f8a9939f43311a7775ecb7a6859ad5f7c1832f0b | |
parent | dc9652e68de163290abee880a74bf1727c715a1e (diff) | |
download | rneovim-231ac048aac9c2208c4a307929112edcc1c31e40.tar.gz rneovim-231ac048aac9c2208c4a307929112edcc1c31e40.tar.bz2 rneovim-231ac048aac9c2208c4a307929112edcc1c31e40.zip |
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.
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
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 "?") |