summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-06 12:29:08 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-04-06 12:29:16 (GMT)
commite1f9b4fae97e176504389aa98753c2be29fc1bb1 (patch)
tree2a015db3fbb851ef5220b18f01c2e868bd6406f6 /Tests
parentf0a27e44f32cbb40669dd4ec81d4029d69bc82a0 (diff)
parent0331092ce6cacca16b37c39186427f3baf1e3164 (diff)
downloadCMake-e1f9b4fae97e176504389aa98753c2be29fc1bb1.zip
CMake-e1f9b4fae97e176504389aa98753c2be29fc1bb1.tar.gz
CMake-e1f9b4fae97e176504389aa98753c2be29fc1bb1.tar.bz2
Merge topic 'fetchcontent-download-no-extract'
0331092ce6 FetchContent: Add support for DOWNLOAD_NO_EXTRACT Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4555
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/FetchContent/DownloadFile.cmake9
-rw-r--r--Tests/RunCMake/FetchContent/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/FetchContent/dummyFile.txt1
3 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/FetchContent/DownloadFile.cmake b/Tests/RunCMake/FetchContent/DownloadFile.cmake
new file mode 100644
index 0000000..741b6d3
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/DownloadFile.cmake
@@ -0,0 +1,9 @@
+include(FetchContent)
+
+FetchContent_Declare(
+ t1
+ URL ${CMAKE_CURRENT_LIST_DIR}/dummyFile.txt
+ DOWNLOAD_NO_EXTRACT YES
+)
+
+FetchContent_Populate(t1)
diff --git a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
index e28ae96..5e2e5e1 100644
--- a/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FetchContent/RunCMakeTest.cmake
@@ -6,6 +6,7 @@ run_cmake(MissingDetails)
run_cmake(DirectIgnoresDetails)
run_cmake(FirstDetailsWin)
run_cmake(DownloadTwice)
+run_cmake(DownloadFile)
run_cmake(SameGenerator)
run_cmake(VarDefinitions)
run_cmake(GetProperties)
diff --git a/Tests/RunCMake/FetchContent/dummyFile.txt b/Tests/RunCMake/FetchContent/dummyFile.txt
new file mode 100644
index 0000000..0a12ce1
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/dummyFile.txt
@@ -0,0 +1 @@
+# This file is used to verify fetching a single file directly