summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
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/RunCMake
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/RunCMake')
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse1-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse1.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse2-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt6
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse2.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse3-result.txt1
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt9
-rw-r--r--Tests/RunCMake/ExternalData/BadRecurse3.cmake2
-rw-r--r--Tests/RunCMake/ExternalData/RunCMakeTest.cmake3
10 files changed, 33 insertions, 0 deletions
diff --git a/Tests/RunCMake/ExternalData/BadRecurse1-result.txt b/Tests/RunCMake/ExternalData/BadRecurse1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt
new file mode 100644
index 0000000..aedc330
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Recurse option "RECURSE:" allowed only with directories.
+Call Stack \(most recent call first\):
+ .*
+ BadRecurse1.cmake:2 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadRecurse1.cmake b/Tests/RunCMake/ExternalData/BadRecurse1.cmake
new file mode 100644
index 0000000..f70b9f9
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse1.cmake
@@ -0,0 +1,2 @@
+include(ExternalData)
+ExternalData_Expand_Arguments(Data args DATA{Series.txt,:,RECURSE:})
diff --git a/Tests/RunCMake/ExternalData/BadRecurse2-result.txt b/Tests/RunCMake/ExternalData/BadRecurse2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt
new file mode 100644
index 0000000..3f809ca
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Recurse option "RECURSE:" allowed only with directories.
+Call Stack \(most recent call first\):
+ .*
+ BadRecurse2.cmake:2 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadRecurse2.cmake b/Tests/RunCMake/ExternalData/BadRecurse2.cmake
new file mode 100644
index 0000000..c4dc35d
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse2.cmake
@@ -0,0 +1,2 @@
+include(ExternalData)
+ExternalData_Expand_Arguments(Data args DATA{Data.txt,RECURSE:})
diff --git a/Tests/RunCMake/ExternalData/BadRecurse3-result.txt b/Tests/RunCMake/ExternalData/BadRecurse3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt
new file mode 100644
index 0000000..37740e0
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
+ Unknown option "RECURSE:x" in argument
+
+ DATA{Directory1/,RECURSE:x,Data.dat}
+
+Call Stack \(most recent call first\):
+ .*
+ BadRecurse3.cmake:2 \(ExternalData_Expand_Arguments\)
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ExternalData/BadRecurse3.cmake b/Tests/RunCMake/ExternalData/BadRecurse3.cmake
new file mode 100644
index 0000000..9a22f62
--- /dev/null
+++ b/Tests/RunCMake/ExternalData/BadRecurse3.cmake
@@ -0,0 +1,2 @@
+include(ExternalData)
+ExternalData_Expand_Arguments(Data args DATA{Directory1/,RECURSE:x,Data.dat})
diff --git a/Tests/RunCMake/ExternalData/RunCMakeTest.cmake b/Tests/RunCMake/ExternalData/RunCMakeTest.cmake
index 241fa1f..b5ab22d 100644
--- a/Tests/RunCMake/ExternalData/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExternalData/RunCMakeTest.cmake
@@ -9,6 +9,9 @@ run_cmake(BadCustom4)
run_cmake(BadHashAlgo1)
run_cmake(BadOption1)
run_cmake(BadOption2)
+run_cmake(BadRecurse1)
+run_cmake(BadRecurse2)
+run_cmake(BadRecurse3)
run_cmake(BadSeries1)
run_cmake(BadSeries2)
run_cmake(BadSeries3)