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

This commit is contained in:
Hemmo Nieminen 2017-06-18 22:58:27 +03:00
parent ea79e94964
commit 1d7c7a7ea6
4 changed files with 16 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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