summaryrefslogtreecommitdiffstats
path: root/Tests/Simple
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-03-17 18:26:30 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-03-17 18:26:30 (GMT)
commite92c98f4b014cec2ecd355d04dd34e88200c4676 (patch)
tree476bb69d9570b19cbb13581f35097fed4b5d77b2 /Tests/Simple
parent889a1194740569428674bf926940adc9d59b5d08 (diff)
downloadCMake-e92c98f4b014cec2ecd355d04dd34e88200c4676.zip
CMake-e92c98f4b014cec2ecd355d04dd34e88200c4676.tar.gz
CMake-e92c98f4b014cec2ecd355d04dd34e88200c4676.tar.bz2
Add testing for when C sources are compiled with C++ compiler
Diffstat (limited to 'Tests/Simple')
-rw-r--r--Tests/Simple/CMakeLists.txt2
-rw-r--r--Tests/Simple/simpleCLib.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/Tests/Simple/CMakeLists.txt b/Tests/Simple/CMakeLists.txt
index d42728d..07a9039 100644
--- a/Tests/Simple/CMakeLists.txt
+++ b/Tests/Simple/CMakeLists.txt
@@ -1,5 +1,5 @@
# a simple test case
PROJECT (simple)
ADD_EXECUTABLE (simple simple.cxx)
-ADD_LIBRARY(simpleLib STATIC simpleLib.cxx)
+ADD_LIBRARY(simpleLib STATIC simpleLib.cxx simpleCLib.c)
TARGET_LINK_LIBRARIES(simple simpleLib)
diff --git a/Tests/Simple/simpleCLib.c b/Tests/Simple/simpleCLib.c
new file mode 100644
index 0000000..f1c5ac2
--- /dev/null
+++ b/Tests/Simple/simpleCLib.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+
+int FooBar()
+{
+ int class;
+ int private = 10;
+ for ( class = 0; class < private; class ++ )
+ {
+ printf("Count: %d/%d\n", class, private);
+ }
+}