diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-11 23:18:40 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-11 23:18:40 +0200 |
commit | 7b8b849817c9616423b129ac6bf1ab11098e8ea2 (patch) | |
tree | 20aea70efb4c0c64fff3f5e0707bb84daf18c15d | |
parent | 03e557992acc87e9ee545db74f8bb1b90592076e (diff) | |
download | meson-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.txt | 3 | ||||
-rw-r--r-- | test cases/7 mixed/func.c | 4 | ||||
-rw-r--r-- | test cases/7 mixed/main.cc | 5 |
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(); +} |