diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2023-10-16 10:07:32 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2024-02-23 09:48:32 -0800 |
commit | 05d49c6990aedb850266f22b40442af7a54e13fc (patch) | |
tree | 139893a88c8c89f5e6085220d88229c3d06540ad /test cases/rust | |
parent | 8ac434694395037e242318e6926c85c1fcccd9b8 (diff) | |
download | meson-05d49c6990aedb850266f22b40442af7a54e13fc.zip meson-05d49c6990aedb850266f22b40442af7a54e13fc.tar.gz meson-05d49c6990aedb850266f22b40442af7a54e13fc.tar.bz2 |
modules/rust: Allow explicitly setting the language to bind
This may be of particular use when a header is .h but should be treated
as a C++ header instead of a C header.
Diffstat (limited to 'test cases/rust')
-rw-r--r-- | test cases/rust/12 bindgen/cpp/meson.build | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test cases/rust/12 bindgen/cpp/meson.build b/test cases/rust/12 bindgen/cpp/meson.build new file mode 100644 index 0000000..8e7103f --- /dev/null +++ b/test cases/rust/12 bindgen/cpp/meson.build @@ -0,0 +1,19 @@ +# SPDX-license-identifer: Apache-2.0 +# Copyright © 2021-2023 Intel Corporation + +fs = import('fs') + +cpp_header = fs.copyfile('../src/header.hpp', 'cpp_header.h') + +cpp_bind_override = rust.bindgen( + input : cpp_header, + output : 'generated-cpp.rs', + language : 'cpp', +) + +cpp_exe2 = executable( + 'cpp_exe2', + structured_sources(['../src/cpp.rs', cpp_bind_override]), + link_with : cpp_lib, +) +test('cpp-forced', cpp_exe2) |