summaryrefslogtreecommitdiffstats
path: root/Tests/SubDir/Examples
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-03-09 21:20:41 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-03-09 21:20:41 (GMT)
commitbf699505bc7fc378abf07ec4dfa0f0cc4fb89686 (patch)
treebb741343a8de8e325fe7ef54b901f929cf849620 /Tests/SubDir/Examples
parentc7067f426f208c7ce8bc5679bbdfd3e45745efd3 (diff)
downloadCMake-bf699505bc7fc378abf07ec4dfa0f0cc4fb89686.zip
CMake-bf699505bc7fc378abf07ec4dfa0f0cc4fb89686.tar.gz
CMake-bf699505bc7fc378abf07ec4dfa0f0cc4fb89686.tar.bz2
ENH: create new test to test subdir exclude
Diffstat (limited to 'Tests/SubDir/Examples')
-rw-r--r--Tests/SubDir/Examples/CMakeLists.txt2
-rw-r--r--Tests/SubDir/Examples/example1/CMakeLists.txt6
-rw-r--r--Tests/SubDir/Examples/example1/example1.cxx7
-rw-r--r--Tests/SubDir/Examples/example2/CMakeLists.txt2
-rw-r--r--Tests/SubDir/Examples/example2/example2.cxx7
5 files changed, 24 insertions, 0 deletions
diff --git a/Tests/SubDir/Examples/CMakeLists.txt b/Tests/SubDir/Examples/CMakeLists.txt
new file mode 100644
index 0000000..44f2ad2
--- /dev/null
+++ b/Tests/SubDir/Examples/CMakeLists.txt
@@ -0,0 +1,2 @@
+PROJECT(Examples)
+SUBDIRS(example1 example2)
diff --git a/Tests/SubDir/Examples/example1/CMakeLists.txt b/Tests/SubDir/Examples/example1/CMakeLists.txt
new file mode 100644
index 0000000..e465899
--- /dev/null
+++ b/Tests/SubDir/Examples/example1/CMakeLists.txt
@@ -0,0 +1,6 @@
+PROJECT(example1)
+ADD_EXECUTABLE(example1 example1.cxx)
+
+ADD_CUSTOM_COMMAND(TARGET example1 POST_BUILD
+ COMMAND "${CMAKE_COMMAND}" ARGS -E remove ${SUBDIR_BINARY_DIR}/ShouldBeHere
+ COMMENT "Remove marker file that should exist because this should not be run")
diff --git a/Tests/SubDir/Examples/example1/example1.cxx b/Tests/SubDir/Examples/example1/example1.cxx
new file mode 100644
index 0000000..3c48194
--- /dev/null
+++ b/Tests/SubDir/Examples/example1/example1.cxx
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ printf("example1\n");
+ return 0;
+}
diff --git a/Tests/SubDir/Examples/example2/CMakeLists.txt b/Tests/SubDir/Examples/example2/CMakeLists.txt
new file mode 100644
index 0000000..19a5376
--- /dev/null
+++ b/Tests/SubDir/Examples/example2/CMakeLists.txt
@@ -0,0 +1,2 @@
+PROJECT(example2)
+ADD_EXECUTABLE(example2 example2.cxx)
diff --git a/Tests/SubDir/Examples/example2/example2.cxx b/Tests/SubDir/Examples/example2/example2.cxx
new file mode 100644
index 0000000..60ef3c9
--- /dev/null
+++ b/Tests/SubDir/Examples/example2/example2.cxx
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ printf("example2\n");
+ return 0;
+}