Add a test case for a "library at project root" use case.

pull/1926/head
Hemmo Nieminen 8 years ago
parent ea79e94964
commit 1d7c7a7ea6
  1. 6
      test cases/common/154 library at root/lib.c
  2. 5
      test cases/common/154 library at root/main/main.c
  3. 2
      test cases/common/154 library at root/main/meson.build
  4. 3
      test cases/common/154 library at root/meson.build

@ -0,0 +1,6 @@
#if defined _WIN32 || defined __CYGWIN__
__declspec(dllexport)
#endif
int fn(void) {
return -1;
}

@ -0,0 +1,5 @@
extern int fn(void);
int main() {
return 1 + fn();
}

@ -0,0 +1,2 @@
exe = executable('main', 'main.c', link_with : lib)
test('stuff works', exe)

@ -0,0 +1,3 @@
project('lib@root', 'c')
lib = shared_library('lib', 'lib.c')
subdir('main')
Loading…
Cancel
Save