ENH: add test for set to create source lists

This commit is contained in:
Bill Hoffman 2002-03-29 11:12:46 -05:00
parent fc6b8e8bf7
commit 0223ba91f3
5 changed files with 33 additions and 1 deletions

View File

@ -1,10 +1,13 @@
PROJECT(TestDriverTest) PROJECT(TestDriverTest)
SET(Extra_SRCS testExtraStuff.cxx testExtraStuff2.cxx )
SET(Extra_SRCS ${Extra_SRCS};testExtraStuff3.cxx )
CREATE_TEST_SOURCELIST(testSrcs CREATE_TEST_SOURCELIST(testSrcs
TestDriverTest TestDriverTest
test1 test1
test2 test2
subdir/test3) subdir/test3)
ADD_EXECUTABLE(TestDriverTest testSrcs) ADD_EXECUTABLE(TestDriverTest testSrcs ${Extra_SRCS})

View File

@ -1,6 +1,23 @@
#include <stdio.h> #include <stdio.h>
int testExtraStuff3();
int testExtraStuff();
int testExtraStuff2();
int test1(int ac, char** av) int test1(int ac, char** av)
{ {
if(!testExtraStuff2())
{
return -1;
}
if(!testExtraStuff())
{
return -1;
}
if(!testExtraStuff3())
{
return -1;
}
printf("test1\n"); printf("test1\n");
for(int i =0; i < ac; i++) for(int i =0; i < ac; i++)
printf("arg %d is %s\n", ac, av[i]); printf("arg %d is %s\n", ac, av[i]);

View File

@ -0,0 +1,4 @@
int testExtraStuff()
{
return 1;
}

View File

@ -0,0 +1,4 @@
int testExtraStuff2()
{
return 1;
}

View File

@ -0,0 +1,4 @@
int testExtraStuff3()
{
return 1;
}