summaryrefslogtreecommitdiffstats
path: root/Tests/SourceGroups
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-24 14:39:51 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-08-24 14:39:51 (GMT)
commite7a1b85f76b38fc8b6889752ca4b5625b05b0cbd (patch)
tree5247ceb5719f8b522a59893afacd6ea92cae4102 /Tests/SourceGroups
parentd634c4e743136882465f7d93283eff3accafa011 (diff)
downloadCMake-e7a1b85f76b38fc8b6889752ca4b5625b05b0cbd.zip
CMake-e7a1b85f76b38fc8b6889752ca4b5625b05b0cbd.tar.gz
CMake-e7a1b85f76b38fc8b6889752ca4b5625b05b0cbd.tar.bz2
ENH: add test for source_group
Alex
Diffstat (limited to 'Tests/SourceGroups')
-rw-r--r--Tests/SourceGroups/CMakeLists.txt9
-rw-r--r--Tests/SourceGroups/bar.c4
-rw-r--r--Tests/SourceGroups/foo.c4
-rw-r--r--Tests/SourceGroups/main.c12
-rw-r--r--Tests/SourceGroups/sub1/foo.c4
-rw-r--r--Tests/SourceGroups/sub1/foobar.c4
6 files changed, 37 insertions, 0 deletions
diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt
new file mode 100644
index 0000000..ab96bac
--- /dev/null
+++ b/Tests/SourceGroups/CMakeLists.txt
@@ -0,0 +1,9 @@
+#source_group(Base FILES main.c)
+#source_group(Base\\Sub1 FILES sub1/foo.c)
+#source_group(Base\\Sub1\\Sub2 FILES sub1/foobar.c)
+#source_group("" FILES foo.c)
+#source_group("\\" FILES bar.c)
+
+
+add_executable(SourceGroups main.c bar.c foo.c sub1/foo.c sub1/foobar.c)
+
diff --git a/Tests/SourceGroups/bar.c b/Tests/SourceGroups/bar.c
new file mode 100644
index 0000000..a2fcad5
--- /dev/null
+++ b/Tests/SourceGroups/bar.c
@@ -0,0 +1,4 @@
+int barbar(void)
+{
+ return 2;
+}
diff --git a/Tests/SourceGroups/foo.c b/Tests/SourceGroups/foo.c
new file mode 100644
index 0000000..3bebc4d
--- /dev/null
+++ b/Tests/SourceGroups/foo.c
@@ -0,0 +1,4 @@
+int bar(void)
+{
+ return 42;
+}
diff --git a/Tests/SourceGroups/main.c b/Tests/SourceGroups/main.c
new file mode 100644
index 0000000..cd17e24
--- /dev/null
+++ b/Tests/SourceGroups/main.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+extern int foo(void);
+extern int bar(void);
+extern int foobar(void);
+extern int barbar(void);
+
+int main()
+{
+ printf("foo: %d bar: %d foobar: %d barbar: %d\n", foo(), bar(), foobar(), barbar());
+ return 0;
+}
diff --git a/Tests/SourceGroups/sub1/foo.c b/Tests/SourceGroups/sub1/foo.c
new file mode 100644
index 0000000..39912a7
--- /dev/null
+++ b/Tests/SourceGroups/sub1/foo.c
@@ -0,0 +1,4 @@
+int foo(void)
+{
+ return 17;
+}
diff --git a/Tests/SourceGroups/sub1/foobar.c b/Tests/SourceGroups/sub1/foobar.c
new file mode 100644
index 0000000..32588b5
--- /dev/null
+++ b/Tests/SourceGroups/sub1/foobar.c
@@ -0,0 +1,4 @@
+int foobar(void)
+{
+ return 1477;
+}