summaryrefslogtreecommitdiffstats
path: root/Tests/Simple
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-03-17 19:29:22 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-03-17 19:29:22 (GMT)
commit72be68d0e0b5aefe462ef23082263db63bde4220 (patch)
treedf674d70f174c42dcf21cb7134f0aa8881770cbe /Tests/Simple
parente92c98f4b014cec2ecd355d04dd34e88200c4676 (diff)
downloadCMake-72be68d0e0b5aefe462ef23082263db63bde4220.zip
CMake-72be68d0e0b5aefe462ef23082263db63bde4220.tar.gz
CMake-72be68d0e0b5aefe462ef23082263db63bde4220.tar.bz2
Improve test
Diffstat (limited to 'Tests/Simple')
-rw-r--r--Tests/Simple/CMakeLists.txt3
-rw-r--r--Tests/Simple/simple.cxx5
-rw-r--r--Tests/Simple/simpleCLib.c1
-rw-r--r--Tests/Simple/simpleWe.cpp16
4 files changed, 24 insertions, 1 deletions
diff --git a/Tests/Simple/CMakeLists.txt b/Tests/Simple/CMakeLists.txt
index 07a9039..810f05d 100644
--- a/Tests/Simple/CMakeLists.txt
+++ b/Tests/Simple/CMakeLists.txt
@@ -1,5 +1,6 @@
# a simple test case
PROJECT (simple)
ADD_EXECUTABLE (simple simple.cxx)
-ADD_LIBRARY(simpleLib STATIC simpleLib.cxx simpleCLib.c)
+ADD_LIBRARY(simpleLib STATIC
+ simpleLib.cxx simpleCLib.c simpleWe.cpp)
TARGET_LINK_LIBRARIES(simple simpleLib)
diff --git a/Tests/Simple/simple.cxx b/Tests/Simple/simple.cxx
index ef26e79..7bee7c0 100644
--- a/Tests/Simple/simple.cxx
+++ b/Tests/Simple/simple.cxx
@@ -1,6 +1,11 @@
extern void simpleLib();
+extern "C" int FooBar();
+extern int bar();
+extern int bar1();
int main ()
{
+ FooBar();
+ bar();
simpleLib();
return 0;
}
diff --git a/Tests/Simple/simpleCLib.c b/Tests/Simple/simpleCLib.c
index f1c5ac2..88fc33e 100644
--- a/Tests/Simple/simpleCLib.c
+++ b/Tests/Simple/simpleCLib.c
@@ -8,4 +8,5 @@ int FooBar()
{
printf("Count: %d/%d\n", class, private);
}
+ return 0;
}
diff --git a/Tests/Simple/simpleWe.cpp b/Tests/Simple/simpleWe.cpp
new file mode 100644
index 0000000..6bdd583
--- /dev/null
+++ b/Tests/Simple/simpleWe.cpp
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+class Foo
+{
+public:
+ Foo()
+ {
+ printf("This one has nonstandard extension\n");
+ }
+};
+
+int bar()
+{
+ Foo f;
+ return 0;
+}