aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-01-11 23:18:40 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-01-11 23:18:40 +0200
commit7b8b849817c9616423b129ac6bf1ab11098e8ea2 (patch)
tree20aea70efb4c0c64fff3f5e0707bb84daf18c15d
parent03e557992acc87e9ee545db74f8bb1b90592076e (diff)
downloadmeson-7b8b849817c9616423b129ac6bf1ab11098e8ea2.zip
meson-7b8b849817c9616423b129ac6bf1ab11098e8ea2.tar.gz
meson-7b8b849817c9616423b129ac6bf1ab11098e8ea2.tar.bz2
Add a test where a single exe has both C and C++ sources.
-rw-r--r--test cases/7 mixed/builder.txt3
-rw-r--r--test cases/7 mixed/func.c4
-rw-r--r--test cases/7 mixed/main.cc5
3 files changed, 12 insertions, 0 deletions
diff --git a/test cases/7 mixed/builder.txt b/test cases/7 mixed/builder.txt
new file mode 100644
index 0000000..15ec234
--- /dev/null
+++ b/test cases/7 mixed/builder.txt
@@ -0,0 +1,3 @@
+project('mixed C and C++', 'c', 'c++')
+exe = executable('prog', 'main.cc', 'func.c')
+add_test('mixtest', exe)
diff --git a/test cases/7 mixed/func.c b/test cases/7 mixed/func.c
new file mode 100644
index 0000000..9019a81
--- /dev/null
+++ b/test cases/7 mixed/func.c
@@ -0,0 +1,4 @@
+int func() {
+ int class = 0;
+ return class;
+}
diff --git a/test cases/7 mixed/main.cc b/test cases/7 mixed/main.cc
new file mode 100644
index 0000000..e2794d5
--- /dev/null
+++ b/test cases/7 mixed/main.cc
@@ -0,0 +1,5 @@
+extern "C" int func();
+
+int main(int argc, char **argv) {
+ return func();
+}