summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorMichael Durso Jr <rbprogrammer@gmail.com>2022-05-06 23:40:33 (GMT)
committerBrad King <brad.king@kitware.com>2022-05-12 14:40:35 (GMT)
commitb1c2cb0436a59845085dd7f5309225ce3093921b (patch)
treedb9236d31f1441202d6a495095320b8ee13be3e6 /Modules/ExternalProject.cmake
parent7dc5824960f44ca7c351a9a5ec0471afc7cc858c (diff)
downloadCMake-b1c2cb0436a59845085dd7f5309225ce3093921b.zip
CMake-b1c2cb0436a59845085dd7f5309225ce3093921b.tar.gz
CMake-b1c2cb0436a59845085dd7f5309225ce3093921b.tar.bz2
ExternalProject: Make SVN interactive with USES_TERMINAL_{DOWNLOAD,UPDATE}
ExternalProject_Add() supports USES_TERMINAL_* flags to enable user input for different steps. The Subversion download options ignored these flags when checking out or updated a Subversion repo. Fixes: #23348
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake17
1 files changed, 15 insertions, 2 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 5c37be2..707de88 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2530,6 +2530,12 @@ function(_ep_add_download_command name)
get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)
+ get_property(uses_terminal TARGET ${name} PROPERTY _EP_USES_TERMINAL_DOWNLOAD)
+ if(uses_terminal)
+ set(svn_interactive_args "")
+ else()
+ set(svn_interactive_args "--non-interactive")
+ endif()
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
@@ -2545,7 +2551,8 @@ function(_ep_add_download_command name)
set(svn_trust_cert_args --trust-server-cert)
endif()
set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision}
- --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args} ${src_name})
+ ${svn_interactive_args} ${svn_trust_cert_args} ${svn_user_pw_args}
+ ${src_name})
elseif(git_repository)
set(method git)
@@ -2934,6 +2941,12 @@ function(_ep_add_update_command name)
get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)
+ get_property(uses_terminal TARGET ${name} PROPERTY _EP_USES_TERMINAL_UPDATE)
+ if(uses_terminal)
+ set(svn_interactive_args "")
+ else()
+ set(svn_interactive_args "--non-interactive")
+ endif()
set(svn_user_pw_args "")
if(DEFINED svn_username)
set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
@@ -2945,7 +2958,7 @@ function(_ep_add_update_command name)
set(svn_trust_cert_args --trust-server-cert)
endif()
set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision}
- --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args})
+ ${svn_interactive_args} ${svn_trust_cert_args} ${svn_user_pw_args})
set(always 1)
elseif(git_repository)
# FetchContent gives us these directly, so don't try to recompute them