summaryrefslogtreecommitdiff
path: root/Modules/FetchContent.cmake
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2019-01-14 22:56:19 +1100
committerCraig Scott <craig.scott@crascit.com>2019-01-14 23:32:18 +1100
commit2119c33b7e7b5fc348c0b4b24e402bcacb18d5db (patch)
tree3d9978c37ad073198673180cb3fa6def0c6ccfd9 /Modules/FetchContent.cmake
parentdd90811bbf61fb9066f84463e9817b94324c105f (diff)
downloadcmake-2119c33b7e7b5fc348c0b4b24e402bcacb18d5db.tar.gz
FetchContent: Give access to the terminal for download and update
A main scenario where this is needed is when a git operation needs the password to a private key and asks for it on the console. Without this change, such operations can appear to hang indefinitely with no prompt if QUIET is in effect (which it is by default). Another scenario this addresses is when progress of a download or update should be shown. Without this change, all such progress is buffered with some generators and will only be shown at the end, which defeats the purpose of logging any progress to begin with. Relates: #18238
Diffstat (limited to 'Modules/FetchContent.cmake')
-rw-r--r--Modules/FetchContent.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake
index 98cdf6cb96..c65ae9ed77 100644
--- a/Modules/FetchContent.cmake
+++ b/Modules/FetchContent.cmake
@@ -691,6 +691,13 @@ function(__FetchContent_directPopulate contentName)
BUILD_COMMAND
INSTALL_COMMAND
TEST_COMMAND
+ # We force both of these to be ON since we are always executing serially
+ # and we want all steps to have access to the terminal in case they
+ # need input from the command line (e.g. ask for a private key password)
+ # or they want to provide timely progress. We silently absorb and
+ # discard these if they are set by the caller.
+ USES_TERMINAL_DOWNLOAD
+ USES_TERMINAL_UPDATE
)
set(multiValueArgs "")