Add a test case for a "library at project root" use case.
This commit is contained in:
parent
ea79e94964
commit
1d7c7a7ea6
|
@ -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…
Reference in New Issue