summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-03-29 16:12:46 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-03-29 16:12:46 (GMT)
commit0223ba91f3aad2014df152612a805d3feb676ddb (patch)
treee642cb5bb87caa6f4e2d33bf510cd25327799ec4
parentfc6b8e8bf7125de4216b6e499db2dc0b967d7731 (diff)
downloadCMake-0223ba91f3aad2014df152612a805d3feb676ddb.zip
CMake-0223ba91f3aad2014df152612a805d3feb676ddb.tar.gz
CMake-0223ba91f3aad2014df152612a805d3feb676ddb.tar.bz2
ENH: add test for set to create source lists
-rw-r--r--Tests/TestDriver/CMakeLists.txt5
-rw-r--r--Tests/TestDriver/test1.cxx17
-rw-r--r--Tests/TestDriver/testExtraStuff.cxx4
-rw-r--r--Tests/TestDriver/testExtraStuff2.cxx4
-rw-r--r--Tests/TestDriver/testExtraStuff3.cxx4
5 files changed, 33 insertions, 1 deletions
diff --git a/Tests/TestDriver/CMakeLists.txt b/Tests/TestDriver/CMakeLists.txt
index a94e8bc..a7f6332 100644
--- a/Tests/TestDriver/CMakeLists.txt
+++ b/Tests/TestDriver/CMakeLists.txt
@@ -1,10 +1,13 @@
PROJECT(TestDriverTest)
+SET(Extra_SRCS testExtraStuff.cxx testExtraStuff2.cxx )
+SET(Extra_SRCS ${Extra_SRCS};testExtraStuff3.cxx )
+
CREATE_TEST_SOURCELIST(testSrcs
TestDriverTest
test1
test2
subdir/test3)
-ADD_EXECUTABLE(TestDriverTest testSrcs)
+ADD_EXECUTABLE(TestDriverTest testSrcs ${Extra_SRCS})
diff --git a/Tests/TestDriver/test1.cxx b/Tests/TestDriver/test1.cxx
index 40aa8d7..1ee7e99 100644
--- a/Tests/TestDriver/test1.cxx
+++ b/Tests/TestDriver/test1.cxx
@@ -1,6 +1,23 @@
#include <stdio.h>
+int testExtraStuff3();
+int testExtraStuff();
+int testExtraStuff2();
+
int test1(int ac, char** av)
{
+ if(!testExtraStuff2())
+ {
+ return -1;
+ }
+ if(!testExtraStuff())
+ {
+ return -1;
+ }
+ if(!testExtraStuff3())
+ {
+ return -1;
+ }
+
printf("test1\n");
for(int i =0; i < ac; i++)
printf("arg %d is %s\n", ac, av[i]);
diff --git a/Tests/TestDriver/testExtraStuff.cxx b/Tests/TestDriver/testExtraStuff.cxx
new file mode 100644
index 0000000..bfd073c
--- /dev/null
+++ b/Tests/TestDriver/testExtraStuff.cxx
@@ -0,0 +1,4 @@
+int testExtraStuff()
+{
+ return 1;
+}
diff --git a/Tests/TestDriver/testExtraStuff2.cxx b/Tests/TestDriver/testExtraStuff2.cxx
new file mode 100644
index 0000000..e755dbe
--- /dev/null
+++ b/Tests/TestDriver/testExtraStuff2.cxx
@@ -0,0 +1,4 @@
+int testExtraStuff2()
+{
+ return 1;
+}
diff --git a/Tests/TestDriver/testExtraStuff3.cxx b/Tests/TestDriver/testExtraStuff3.cxx
new file mode 100644
index 0000000..9c239d4
--- /dev/null
+++ b/Tests/TestDriver/testExtraStuff3.cxx
@@ -0,0 +1,4 @@
+int testExtraStuff3()
+{
+ return 1;
+}