diff options
Diffstat (limited to 'meson/test cases/unit/56 dedup compiler libs/liba')
3 files changed, 34 insertions, 0 deletions
diff --git a/meson/test cases/unit/56 dedup compiler libs/liba/liba.c b/meson/test cases/unit/56 dedup compiler libs/liba/liba.c new file mode 100644 index 000000000..962d47f30 --- /dev/null +++ b/meson/test cases/unit/56 dedup compiler libs/liba/liba.c @@ -0,0 +1,18 @@ +#include "liba.h" + +static int val; + +void liba_add(int x) +{ + val += x; +} + +void liba_sub(int x) +{ + val -= x; +} + +int liba_get(void) +{ + return val; +} diff --git a/meson/test cases/unit/56 dedup compiler libs/liba/liba.h b/meson/test cases/unit/56 dedup compiler libs/liba/liba.h new file mode 100644 index 000000000..a980cdc6b --- /dev/null +++ b/meson/test cases/unit/56 dedup compiler libs/liba/liba.h @@ -0,0 +1,8 @@ +#ifndef LIBA_H_ +#define LIBA_H_ + +void liba_add(int x); +void liba_sub(int x); +int liba_get(void); + +#endif diff --git a/meson/test cases/unit/56 dedup compiler libs/liba/meson.build b/meson/test cases/unit/56 dedup compiler libs/liba/meson.build new file mode 100644 index 000000000..eccfa46c3 --- /dev/null +++ b/meson/test cases/unit/56 dedup compiler libs/liba/meson.build @@ -0,0 +1,8 @@ +deps = [dependency('threads'), cc.find_library('dl'), cc.find_library('m')] + +liba = library('a', 'liba.c', + dependencies: deps) + +liba_dep = declare_dependency(link_with: liba, + include_directories: include_directories('.'), + dependencies: deps) |