diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-31 18:11:40 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-31 18:11:40 +0300 |
| commit | 5efb36caaba279a91fdb15823ff35887bfa1ac82 (patch) | |
| tree | 78342f133a2654b664e4905c1667061c7e50b41c /test cases/common | |
| parent | 6b56bfd10e36471f2e82499a14237b1ec244d45a (diff) | |
| download | meson-5efb36caaba279a91fdb15823ff35887bfa1ac82.tar.gz | |
Apparently dynamic linking with C++ had been broken for a while now. Sorry about that.
Diffstat (limited to 'test cases/common')
| -rw-r--r-- | test cases/common/6 linkshared/cpplib.cpp | 3 | ||||
| -rw-r--r-- | test cases/common/6 linkshared/cppmain.cpp | 5 | ||||
| -rw-r--r-- | test cases/common/6 linkshared/meson.build | 7 |
3 files changed, 14 insertions, 1 deletions
diff --git a/test cases/common/6 linkshared/cpplib.cpp b/test cases/common/6 linkshared/cpplib.cpp new file mode 100644 index 000000000..b997405c3 --- /dev/null +++ b/test cases/common/6 linkshared/cpplib.cpp @@ -0,0 +1,3 @@ +int cppfunc() { + return 42; +} diff --git a/test cases/common/6 linkshared/cppmain.cpp b/test cases/common/6 linkshared/cppmain.cpp new file mode 100644 index 000000000..b2e40257c --- /dev/null +++ b/test cases/common/6 linkshared/cppmain.cpp @@ -0,0 +1,5 @@ +int cppfunc(); + +int main(int argc, char **argv) { + return cppfunc() != 42; +} diff --git a/test cases/common/6 linkshared/meson.build b/test cases/common/6 linkshared/meson.build index 8e10295dd..1ecb05238 100644 --- a/test cases/common/6 linkshared/meson.build +++ b/test cases/common/6 linkshared/meson.build @@ -1,7 +1,12 @@ -project('shared library linking test', 'c') +project('shared library linking test', 'c', 'cpp') + lib = shared_library('mylib', 'libfile.c' # Split to different lines before and after the comma to test parser. , install : true) exe = executable('prog', 'main.c', link_with : lib, install : true) test('runtest', exe) + +cpplib = shared_library('mycpplib', 'cpplib.cpp') +cppexe = executable('cppprog', 'cppmain.cpp', link_with : cpplib) +test('cpptest', cppexe) |
