From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- .../test cases/common/225 link language/c_linkage.cpp | 5 +++++ meson/test cases/common/225 link language/c_linkage.h | 10 ++++++++++ meson/test cases/common/225 link language/lib.cpp | 5 +++++ meson/test cases/common/225 link language/main.c | 5 +++++ meson/test cases/common/225 link language/meson.build | 18 ++++++++++++++++++ 5 files changed, 43 insertions(+) create mode 100644 meson/test cases/common/225 link language/c_linkage.cpp create mode 100644 meson/test cases/common/225 link language/c_linkage.h create mode 100644 meson/test cases/common/225 link language/lib.cpp create mode 100644 meson/test cases/common/225 link language/main.c create mode 100644 meson/test cases/common/225 link language/meson.build (limited to 'meson/test cases/common/225 link language') diff --git a/meson/test cases/common/225 link language/c_linkage.cpp b/meson/test cases/common/225 link language/c_linkage.cpp new file mode 100644 index 000000000..dc006b936 --- /dev/null +++ b/meson/test cases/common/225 link language/c_linkage.cpp @@ -0,0 +1,5 @@ +extern "C" { + int makeInt(void) { + return 0; + } +} diff --git a/meson/test cases/common/225 link language/c_linkage.h b/meson/test cases/common/225 link language/c_linkage.h new file mode 100644 index 000000000..1609f4702 --- /dev/null +++ b/meson/test cases/common/225 link language/c_linkage.h @@ -0,0 +1,10 @@ + +#ifdef __cplusplus +extern "C" { +#endif + +int makeInt(void); + +#ifdef __cplusplus +} +#endif diff --git a/meson/test cases/common/225 link language/lib.cpp b/meson/test cases/common/225 link language/lib.cpp new file mode 100644 index 000000000..ab4382832 --- /dev/null +++ b/meson/test cases/common/225 link language/lib.cpp @@ -0,0 +1,5 @@ +extern "C" { + int makeInt(void) { + return 1; + } +} diff --git a/meson/test cases/common/225 link language/main.c b/meson/test cases/common/225 link language/main.c new file mode 100644 index 000000000..5a167e785 --- /dev/null +++ b/meson/test cases/common/225 link language/main.c @@ -0,0 +1,5 @@ +#include "c_linkage.h" + +int main(void) { + return makeInt(); +} diff --git a/meson/test cases/common/225 link language/meson.build b/meson/test cases/common/225 link language/meson.build new file mode 100644 index 000000000..f9af6cd32 --- /dev/null +++ b/meson/test cases/common/225 link language/meson.build @@ -0,0 +1,18 @@ +project( + 'link_language', + ['c', 'cpp'], +) + +exe = executable( + 'main', + ['main.c', 'c_linkage.cpp'], + link_language : 'c', +) + +lib = library( + 'mylib', + ['lib.cpp'], + link_language : 'c', +) + +test('main', exe) -- cgit 1.2.3-korg