summaryrefslogtreecommitdiffstats
path: root/Tests/Module/ExternalData/Data1Check.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-03-25 14:23:51 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-27 18:44:54 (GMT)
commit230f2d6e7060e70b7205fc65f6bee7ce37e3f27b (patch)
treebb56d929adf957977dfc5db26805a6a29f80a6ec /Tests/Module/ExternalData/Data1Check.cmake
parent564c07f7dd819d9ea070b22ad16849d3be6bb89a (diff)
downloadCMake-230f2d6e7060e70b7205fc65f6bee7ce37e3f27b.zip
CMake-230f2d6e7060e70b7205fc65f6bee7ce37e3f27b.tar.gz
CMake-230f2d6e7060e70b7205fc65f6bee7ce37e3f27b.tar.bz2
ExternalData: Add option to recursively match under directories
Extend the ``DATA{Dir/,...}`` syntax with a new ``RECURSE:`` option to enable recursive matching of associated files. This will allow an entire directory tree of data to be referenced at once.
Diffstat (limited to 'Tests/Module/ExternalData/Data1Check.cmake')
-rw-r--r--Tests/Module/ExternalData/Data1Check.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/Module/ExternalData/Data1Check.cmake b/Tests/Module/ExternalData/Data1Check.cmake
index 9845a3b..f60c209 100644
--- a/Tests/Module/ExternalData/Data1Check.cmake
+++ b/Tests/Module/ExternalData/Data1Check.cmake
@@ -90,6 +90,12 @@ foreach(n A B C)
message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
endif()
endforeach()
+foreach(n A Sub1/A Sub2/Dir/A B Sub1/B Sub2/Dir/B C Sub1/C Sub2/Dir/C)
+ set(file "${DirRecurse}/${n}.dat")
+ if(NOT EXISTS "${file}")
+ message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!")
+ endif()
+endforeach()
list(LENGTH Semicolons len)
if("${len}" EQUAL 2)
foreach(file ${Semicolons})