Add test for subprojects in subdirectories

0.44
Matthias Klumpp 7 years ago committed by Nirbheek Chauhan
parent fcee3c9eba
commit db9a5f7fc7
  1. 15
      test cases/common/177 subproject nested subproject dirs/contrib/subprojects/alpha/a.c
  2. 4
      test cases/common/177 subproject nested subproject dirs/contrib/subprojects/alpha/meson.build
  3. 1
      test cases/common/177 subproject nested subproject dirs/contrib/subprojects/alpha/var/subprojects/wrap_files_might_be_here
  4. 14
      test cases/common/177 subproject nested subproject dirs/contrib/subprojects/beta/b.c
  5. 3
      test cases/common/177 subproject nested subproject dirs/contrib/subprojects/beta/meson.build
  6. 7
      test cases/common/177 subproject nested subproject dirs/meson.build
  7. 5
      test cases/common/177 subproject nested subproject dirs/prog.c

@ -0,0 +1,15 @@
int func2();
#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() { return func2(); }

@ -0,0 +1,4 @@
project('alpha project', 'c', subproject_dir: 'var/subprojects')
b = subproject('beta')
l = shared_library('a', 'a.c', link_with : b.get_variable('lb'))

@ -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() {
return 42;
}

@ -0,0 +1,3 @@
project('beta project', 'c')
lb = shared_library('b', 'b.c')

@ -0,0 +1,7 @@
project('gamma project', 'c', subproject_dir: 'contrib/subprojects')
a = subproject('alpha')
lib = a.get_variable('l')
exe = executable('prog', 'prog.c', link_with : lib)
test('basic', exe)

@ -0,0 +1,5 @@
int func();
int main(int argc, char **argv) {
return func() == 42 ? 0 : 1;
}
Loading…
Cancel
Save