mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 14:01:21 +00:00
Merge topic 'fetchcontent-uses-terminal'
2119c33b7e
FetchContent: Give access to the terminal for download and update
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.co>
Merge-request: !2800
This commit is contained in:
commit
da566d4de8
@ -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 "")
|
||||
|
||||
|
@ -18,4 +18,6 @@ ExternalProject_Add(${contentName}-populate
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
USES_TERMINAL_DOWNLOAD YES
|
||||
USES_TERMINAL_UPDATE YES
|
||||
)
|
||||
|
@ -1,3 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
|
||||
# Tests assume no previous downloads in the output directory
|
||||
file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/_deps)
|
||||
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
@ -10,6 +10,7 @@ run_cmake(SameGenerator)
|
||||
run_cmake(VarDefinitions)
|
||||
run_cmake(GetProperties)
|
||||
run_cmake(DirOverrides)
|
||||
run_cmake(UsesTerminalOverride)
|
||||
|
||||
# We need to pass through CMAKE_GENERATOR and CMAKE_MAKE_PROGRAM
|
||||
# to ensure the test can run on machines where the build tool
|
||||
|
@ -0,0 +1,2 @@
|
||||
Logged from t1 download step
|
||||
+.*Logged from t2 download step
|
17
Tests/RunCMake/FetchContent/UsesTerminalOverride.cmake
Normal file
17
Tests/RunCMake/FetchContent/UsesTerminalOverride.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
include(FetchContent)
|
||||
|
||||
set(FETCHCONTENT_QUIET NO)
|
||||
|
||||
FetchContent_Declare(
|
||||
t1
|
||||
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Logged from t1 download step"
|
||||
USES_TERMINAL_DOWNLOAD NO
|
||||
|
||||
)
|
||||
FetchContent_Populate(t1)
|
||||
|
||||
FetchContent_Populate(
|
||||
t2
|
||||
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Logged from t2 download step"
|
||||
USES_TERMINAL_DOWNLOAD NO
|
||||
)
|
Loading…
Reference in New Issue
Block a user