diff options
author | Brad King <brad.king@kitware.com> | 2015-10-15 13:34:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-10-15 13:35:43 (GMT) |
commit | c9e0173e6fb3ddefb43edaa5235eef2c7b31ad67 (patch) | |
tree | 426836894df65bda0f708d8f2972bc5a17850d61 /Modules/ExternalProject.cmake | |
parent | 4cd52dc5511c8c3809b7cb260ac6afa7eec65f2e (diff) | |
download | CMake-c9e0173e6fb3ddefb43edaa5235eef2c7b31ad67.zip CMake-c9e0173e6fb3ddefb43edaa5235eef2c7b31ad67.tar.gz CMake-c9e0173e6fb3ddefb43edaa5235eef2c7b31ad67.tar.bz2 |
ExternalProject: Always use CMake builtin FindGit (#15791)
Unset CMAKE_MODULE_PATH before calling find_package(Git) to ensure we do
not get a project-provided FindGit module that may not provide the
GIT_VERSION_STRING that we need. We do not need to restore the value
explicitly because this occurs inside the _ep_add_download_command
function call scope.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index dda45b9..c822bdb 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1731,6 +1731,7 @@ function(_ep_add_download_command name) --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args} ${src_name}) list(APPEND depends ${stamp_dir}/${name}-svninfo.txt) elseif(git_repository) + unset(CMAKE_MODULE_PATH) # Use CMake builtin find module find_package(Git QUIET) if(NOT GIT_EXECUTABLE) message(FATAL_ERROR "error: could not find git for clone of ${name}") |