diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2007-02-22 13:39:12 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2007-02-22 13:39:12 (GMT) |
commit | 1db4c0e5241113f7bf79f195418f8e7a6b25570f (patch) | |
tree | 001aa11b99d582222d4567e0cc1ad2ed20448c73 /Tests/SimpleExclude/dirC | |
parent | 5647e6e254f82a81997cd3913f872b06fe761f1e (diff) | |
download | CMake-1db4c0e5241113f7bf79f195418f8e7a6b25570f.zip CMake-1db4c0e5241113f7bf79f195418f8e7a6b25570f.tar.gz CMake-1db4c0e5241113f7bf79f195418f8e7a6b25570f.tar.bz2 |
ENH: Add simple exclusion test for subdirectories
Diffstat (limited to 'Tests/SimpleExclude/dirC')
-rw-r--r-- | Tests/SimpleExclude/dirC/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/SimpleExclude/dirC/dirA/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/SimpleExclude/dirC/dirA/t1.c | 8 | ||||
-rw-r--r-- | Tests/SimpleExclude/dirC/dirA/t2.c | 7 | ||||
-rw-r--r-- | Tests/SimpleExclude/dirC/dirA/t3.c | 7 | ||||
-rw-r--r-- | Tests/SimpleExclude/dirC/dirA/t4.c | 17 | ||||
-rw-r--r-- | Tests/SimpleExclude/dirC/dirA/t5.c | 7 | ||||
-rw-r--r-- | Tests/SimpleExclude/dirC/dirB/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/SimpleExclude/dirC/dirB/t6.c | 8 | ||||
-rw-r--r-- | Tests/SimpleExclude/dirC/dirB/t7.c | 16 |
10 files changed, 88 insertions, 0 deletions
diff --git a/Tests/SimpleExclude/dirC/CMakeLists.txt b/Tests/SimpleExclude/dirC/CMakeLists.txt new file mode 100644 index 0000000..9b59fda --- /dev/null +++ b/Tests/SimpleExclude/dirC/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(dirA EXCLUDE_FROM_ALL) +add_subdirectory(dirB) + diff --git a/Tests/SimpleExclude/dirC/dirA/CMakeLists.txt b/Tests/SimpleExclude/dirC/dirA/CMakeLists.txt new file mode 100644 index 0000000..5a7a9cb --- /dev/null +++ b/Tests/SimpleExclude/dirC/dirA/CMakeLists.txt @@ -0,0 +1,10 @@ +add_library(t1 t1.c) + +add_library(t2 t2.c) + +add_executable(t3 t3.c) + +add_executable(t4 t4.c) + +add_executable(t5 t5.c) +target_link_libraries(t5 t1) diff --git a/Tests/SimpleExclude/dirC/dirA/t1.c b/Tests/SimpleExclude/dirC/dirA/t1.c new file mode 100644 index 0000000..67fe06f --- /dev/null +++ b/Tests/SimpleExclude/dirC/dirA/t1.c @@ -0,0 +1,8 @@ +#include <stdio.h> + +int tlib1func() +{ + Should not be build unless target directory A, B, or C are build; + printf("This is T1\n"); + return 5; +} diff --git a/Tests/SimpleExclude/dirC/dirA/t2.c b/Tests/SimpleExclude/dirC/dirA/t2.c new file mode 100644 index 0000000..6aaf406 --- /dev/null +++ b/Tests/SimpleExclude/dirC/dirA/t2.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int tlib2func() +{ + printf("This is T2\n"); + return 2; +} diff --git a/Tests/SimpleExclude/dirC/dirA/t3.c b/Tests/SimpleExclude/dirC/dirA/t3.c new file mode 100644 index 0000000..1366dc0 --- /dev/null +++ b/Tests/SimpleExclude/dirC/dirA/t3.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main(int argc, char* argv[]) +{ + Should not be build unless target directory A, B, or C are build; + return 0; +} diff --git a/Tests/SimpleExclude/dirC/dirA/t4.c b/Tests/SimpleExclude/dirC/dirA/t4.c new file mode 100644 index 0000000..7c36ca9 --- /dev/null +++ b/Tests/SimpleExclude/dirC/dirA/t4.c @@ -0,0 +1,17 @@ +#include <stdio.h> + +#ifdef __CLASSIC_C__ +int main() +{ + int ac; + char*av[]; +#else + int main(int ac, char*av[]) + { +#endif + if(ac > 1000){return *av[0];} + printf("This is T4. This one should work.\n"); + return 0; + } + + diff --git a/Tests/SimpleExclude/dirC/dirA/t5.c b/Tests/SimpleExclude/dirC/dirA/t5.c new file mode 100644 index 0000000..1fba212 --- /dev/null +++ b/Tests/SimpleExclude/dirC/dirA/t5.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main(int argc, char* argv[]) +{ + Should not be build unless target directory A, B, or C are build; + return 5; +} diff --git a/Tests/SimpleExclude/dirC/dirB/CMakeLists.txt b/Tests/SimpleExclude/dirC/dirB/CMakeLists.txt new file mode 100644 index 0000000..6caea32 --- /dev/null +++ b/Tests/SimpleExclude/dirC/dirB/CMakeLists.txt @@ -0,0 +1,5 @@ +add_library(t6 t6.c) + +add_library(t7 t7.c) +target_link_libraries(t7 t2) + diff --git a/Tests/SimpleExclude/dirC/dirB/t6.c b/Tests/SimpleExclude/dirC/dirB/t6.c new file mode 100644 index 0000000..e8877df --- /dev/null +++ b/Tests/SimpleExclude/dirC/dirB/t6.c @@ -0,0 +1,8 @@ +#include <stdio.h> + +int tlib6func() +{ + Should not be build unless target directory B, or C are build; + printf("This is T6\n"); + return 6; +} diff --git a/Tests/SimpleExclude/dirC/dirB/t7.c b/Tests/SimpleExclude/dirC/dirB/t7.c new file mode 100644 index 0000000..b95d3ec --- /dev/null +++ b/Tests/SimpleExclude/dirC/dirB/t7.c @@ -0,0 +1,16 @@ +#include <stdio.h> + +extern int tlib2func(); + +int tlib7func() +{ + printf("This is T7\n"); + + if ( tlib2func() != 2 ) + { + fprintf(stderr, "Something wrong with T2\n"); + return 1; + } + + return 7; +} |