diff options
author | Brad King <brad.king@kitware.com> | 2019-01-15 18:25:56 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-15 18:26:02 (GMT) |
commit | da566d4de885130e182edc80f13691f5ca24bb61 (patch) | |
tree | d16c9d04118115b387758ebcfbcf11a6d0c5822f /Tests | |
parent | 41b0c0dc739c34550b8e9054b9a88405afb6518d (diff) | |
parent | 2119c33b7e7b5fc348c0b4b24e402bcacb18d5db (diff) | |
download | CMake-da566d4de885130e182edc80f13691f5ca24bb61.zip CMake-da566d4de885130e182edc80f13691f5ca24bb61.tar.gz CMake-da566d4de885130e182edc80f13691f5ca24bb61.tar.bz2 |
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
Diffstat (limited to 'Tests')
4 files changed, 24 insertions, 0 deletions
diff --git a/Tests/RunCMake/FetchContent/CMakeLists.txt b/Tests/RunCMake/FetchContent/CMakeLists.txt index d3137f6..3cc2e43 100644 --- a/Tests/RunCMake/FetchContent/CMakeLists.txt +++ b/Tests/RunCMake/FetchContent/CMakeLists.txt @@ -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) diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake index 621fb8b..9c1ab66 100644 --- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake +++ b/Tests/RunCMake/FetchContent/RunCMakeTest.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 diff --git a/Tests/RunCMake/FetchContent/UsesTerminalOverride-stdout.txt b/Tests/RunCMake/FetchContent/UsesTerminalOverride-stdout.txt new file mode 100644 index 0000000..3718d64 --- /dev/null +++ b/Tests/RunCMake/FetchContent/UsesTerminalOverride-stdout.txt @@ -0,0 +1,2 @@ +Logged from t1 download step ++.*Logged from t2 download step diff --git a/Tests/RunCMake/FetchContent/UsesTerminalOverride.cmake b/Tests/RunCMake/FetchContent/UsesTerminalOverride.cmake new file mode 100644 index 0000000..99d9719 --- /dev/null +++ b/Tests/RunCMake/FetchContent/UsesTerminalOverride.cmake @@ -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 +) |