diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
commit | 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch) | |
tree | 4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/common/167 subproject nested subproject dirs | |
parent | Initial commit. (diff) | |
download | meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip |
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/common/167 subproject nested subproject dirs')
7 files changed, 53 insertions, 0 deletions
diff --git a/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/a.c b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/a.c new file mode 100644 index 0000000..102041e --- /dev/null +++ b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/a.c @@ -0,0 +1,14 @@ +int func2(void); + +#if defined _WIN32 || defined __CYGWIN__ + #define DLL_PUBLIC __declspec(dllexport) +#else + #if defined __GNUC__ + #define DLL_PUBLIC __attribute__ ((visibility("default"))) + #else + #pragma message ("Compiler does not support symbol visibility.") + #define DLL_PUBLIC + #endif +#endif + +int DLL_PUBLIC func(void) { return func2(); } diff --git a/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/meson.build b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/meson.build new file mode 100644 index 0000000..1014db1 --- /dev/null +++ b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/meson.build @@ -0,0 +1,4 @@ +project('alpha project', 'c', subproject_dir: 'var/subprojects') + +b = subproject('beta') +l = library('a', 'a.c', link_with : b.get_variable('lb')) diff --git a/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/var/subprojects/wrap_files_might_be_here b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/var/subprojects/wrap_files_might_be_here new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/var/subprojects/wrap_files_might_be_here @@ -0,0 +1 @@ + diff --git a/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/beta/b.c b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/beta/b.c new file mode 100644 index 0000000..8c07177 --- /dev/null +++ b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/beta/b.c @@ -0,0 +1,14 @@ +#if defined _WIN32 || defined __CYGWIN__ + #define DLL_PUBLIC __declspec(dllexport) +#else + #if defined __GNUC__ + #define DLL_PUBLIC __attribute__ ((visibility("default"))) + #else + #pragma message ("Compiler does not support symbol visibility.") + #define DLL_PUBLIC + #endif +#endif + +int DLL_PUBLIC func2(void) { + return 42; +} diff --git a/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/beta/meson.build b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/beta/meson.build new file mode 100644 index 0000000..1720d3e --- /dev/null +++ b/test cases/common/167 subproject nested subproject dirs/contrib/subprojects/beta/meson.build @@ -0,0 +1,4 @@ +project('beta project', 'c') + +lb = shared_library('b', 'b.c') +notfound = dependency('', required : false) diff --git a/test cases/common/167 subproject nested subproject dirs/meson.build b/test cases/common/167 subproject nested subproject dirs/meson.build new file mode 100644 index 0000000..875eed3 --- /dev/null +++ b/test cases/common/167 subproject nested subproject dirs/meson.build @@ -0,0 +1,11 @@ +project('gamma project', 'c', subproject_dir: 'contrib/subprojects') + +a = subproject('alpha') +lib = a.get_variable('l') + +# Ensure that the dependency version is not checked for a not-found dependency +notfound = dependency('', version : '>=1.0', required : false, + fallback : ['beta', 'notfound']) + +exe = executable('prog', 'prog.c', link_with : lib) +test('basic', exe) diff --git a/test cases/common/167 subproject nested subproject dirs/prog.c b/test cases/common/167 subproject nested subproject dirs/prog.c new file mode 100644 index 0000000..27162c5 --- /dev/null +++ b/test cases/common/167 subproject nested subproject dirs/prog.c @@ -0,0 +1,5 @@ +int func(void); + +int main(void) { + return func() == 42 ? 0 : 1; +} |