diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-02-15 02:21:32 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2020-02-15 02:23:56 (GMT) |
commit | ef3194a6f821da30c461363530b8a7059dd85a58 (patch) | |
tree | 949ebdd0fc5cca7a6c669c7cad2d1bc97d71c0d0 | |
parent | 40d1d29cfa732b980e97a3a29da3bbbc9749c408 (diff) | |
download | CMake-ef3194a6f821da30c461363530b8a7059dd85a58.zip CMake-ef3194a6f821da30c461363530b8a7059dd85a58.tar.gz CMake-ef3194a6f821da30c461363530b8a7059dd85a58.tar.bz2 |
ExternalProject: Quote each git --config option to handle spaces
Fixes: #20354
-rw-r--r-- | Modules/ExternalProject.cmake | 2 | ||||
-rw-r--r-- | Tests/ExternalProject/CMakeLists.txt | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index c69a2ee..5bac0d8 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1096,7 +1096,7 @@ function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git list(APPEND git_clone_options --progress) endif() foreach(config IN LISTS git_config) - list(APPEND git_clone_options --config ${config}) + list(APPEND git_clone_options --config \"${config}\") endforeach() if(NOT ${git_remote_name} STREQUAL "origin") list(APPEND git_clone_options --origin \"${git_remote_name}\") diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index 3e49176..450e7e5 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -380,7 +380,9 @@ if(do_git_tests) set(proj TutorialStep1-GIT-config) ExternalProject_Add(${proj} GIT_REPOSITORY "${local_git_repo}" - GIT_CONFIG core.eol=lf core.autocrlf=input + GIT_CONFIG core.eol=lf + core.autocrlf=input + "http.extraheader=AUTHORIZATION: bearer --unsupportedOption" CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> INSTALL_COMMAND "" |