summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-24 18:21:06 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-24 18:22:40 (GMT)
commita9fa6a2c777bf68ac1c6d885fd07b21bf98e3f77 (patch)
tree24a175069412090d04a82548e717e47cc88ef804 /Modules
parent6cbad490c2fdbd9bdc67b406b9f2dcdc21e08ddb (diff)
downloadCMake-a9fa6a2c777bf68ac1c6d885fd07b21bf98e3f77.zip
CMake-a9fa6a2c777bf68ac1c6d885fd07b21bf98e3f77.tar.gz
CMake-a9fa6a2c777bf68ac1c6d885fd07b21bf98e3f77.tar.bz2
ExternalProject: Run `git checkout` with `--` to clarify arguments
Fix the case when the tag name to be checked out also happens to match a path name. Fixes: #16678
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 458c114..95fbd53 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -594,7 +594,7 @@ if(error_code)
endif()
execute_process(
- COMMAND \"${git_EXECUTABLE}\" \${git_options} checkout ${git_tag}
+ COMMAND \"${git_EXECUTABLE}\" \${git_options} checkout ${git_tag} --
WORKING_DIRECTORY \"${work_dir}/${src_name}\"
RESULT_VARIABLE error_code
)