summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FetchContent/countArgs.cmake
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2020-05-14 10:57:07 (GMT)
committerCraig Scott <craig.scott@crascit.com>2020-05-23 13:42:43 (GMT)
commit8dca6bd04b29c418c809ffc7872bb77e44ac3796 (patch)
treedf44163cea644ade363a74f6d2334bb07cd32ee9 /Tests/RunCMake/FetchContent/countArgs.cmake
parentcbf2daeed08c21fc79cbcfa938a506a06b30e787 (diff)
downloadCMake-8dca6bd04b29c418c809ffc7872bb77e44ac3796.zip
CMake-8dca6bd04b29c418c809ffc7872bb77e44ac3796.tar.gz
CMake-8dca6bd04b29c418c809ffc7872bb77e44ac3796.tar.bz2
FetchContent: Preserve empty string arguments
Fixes: #20579
Diffstat (limited to 'Tests/RunCMake/FetchContent/countArgs.cmake')
-rw-r--r--Tests/RunCMake/FetchContent/countArgs.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/FetchContent/countArgs.cmake b/Tests/RunCMake/FetchContent/countArgs.cmake
new file mode 100644
index 0000000..7542af4
--- /dev/null
+++ b/Tests/RunCMake/FetchContent/countArgs.cmake
@@ -0,0 +1,5 @@
+message(STATUS "Number of arguments: ${CMAKE_ARGC}")
+math(EXPR last "${CMAKE_ARGC} - 1")
+foreach(n RANGE 3 ${last})
+ message(STATUS "Argument ${n}: '${CMAKE_ARGV${n}}'")
+endforeach()