diff options
Diffstat (limited to 'test cases/failing/65 subproj different versions')
11 files changed, 67 insertions, 0 deletions
diff --git a/test cases/failing/65 subproj different versions/main.c b/test cases/failing/65 subproj different versions/main.c new file mode 100644 index 0000000..8793c62 --- /dev/null +++ b/test cases/failing/65 subproj different versions/main.c @@ -0,0 +1,9 @@ +#include <stdio.h> +#include "a.h" +#include "b.h" + +int main(int argc, char **argv) { + int life = a_fun() + b_fun(); + printf("%d\n", life); + return 0; +} diff --git a/test cases/failing/65 subproj different versions/meson.build b/test cases/failing/65 subproj different versions/meson.build new file mode 100644 index 0000000..e964e42 --- /dev/null +++ b/test cases/failing/65 subproj different versions/meson.build @@ -0,0 +1,9 @@ +project('super', 'c') + +# A will use version 1 of C +a_dep = dependency('a', fallback: ['a', 'a_dep']) + +# B will fail because it requests version 2 of C +b_dep = dependency('b', fallback: ['b', 'b_dep']) + +main = executable('main', files('main.c'), dependencies: [a_dep, b_dep]) diff --git a/test cases/failing/65 subproj different versions/subprojects/a/a.c b/test cases/failing/65 subproj different versions/subprojects/a/a.c new file mode 100644 index 0000000..cd41a65 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/a/a.c @@ -0,0 +1,5 @@ +#include "c.h" + +int a_fun() { + return c_fun(); +} diff --git a/test cases/failing/65 subproj different versions/subprojects/a/a.h b/test cases/failing/65 subproj different versions/subprojects/a/a.h new file mode 100644 index 0000000..8f1d49e --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/a/a.h @@ -0,0 +1 @@ +int a_fun(); diff --git a/test cases/failing/65 subproj different versions/subprojects/a/meson.build b/test cases/failing/65 subproj different versions/subprojects/a/meson.build new file mode 100644 index 0000000..e84182a --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/a/meson.build @@ -0,0 +1,11 @@ +project('a', 'c') + +c_dep = dependency('c', version:'1', fallback: ['c', 'c_dep']) + +alib = library('a', 'a.c', + dependencies: c_dep) + +a_dep = declare_dependency( + link_with: alib, + include_directories: include_directories('.'), +) diff --git a/test cases/failing/65 subproj different versions/subprojects/b/b.c b/test cases/failing/65 subproj different versions/subprojects/b/b.c new file mode 100644 index 0000000..f85f8c3 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/b/b.c @@ -0,0 +1,5 @@ +#include "c.h" + +int b_fun(){ +return c_fun(); +} diff --git a/test cases/failing/65 subproj different versions/subprojects/b/b.h b/test cases/failing/65 subproj different versions/subprojects/b/b.h new file mode 100644 index 0000000..eced786 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/b/b.h @@ -0,0 +1 @@ +int b_fun(); diff --git a/test cases/failing/65 subproj different versions/subprojects/b/meson.build b/test cases/failing/65 subproj different versions/subprojects/b/meson.build new file mode 100644 index 0000000..0398340 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/b/meson.build @@ -0,0 +1,11 @@ +project('b', 'c') + +c_dep = dependency('c', version:'2', fallback: ['c', 'c_dep']) + +blib = library('b', 'b.c', + dependencies: c_dep) + +b_dep = declare_dependency( + link_with: blib, + include_directories: include_directories('.'), +) diff --git a/test cases/failing/65 subproj different versions/subprojects/c/c.h b/test cases/failing/65 subproj different versions/subprojects/c/c.h new file mode 100644 index 0000000..2b15f60 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/c/c.h @@ -0,0 +1,3 @@ +static int c_fun(){ + return 3; +} diff --git a/test cases/failing/65 subproj different versions/subprojects/c/meson.build b/test cases/failing/65 subproj different versions/subprojects/c/meson.build new file mode 100644 index 0000000..7184933 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/c/meson.build @@ -0,0 +1,5 @@ +project('c', 'c', version:'1') + +c_dep = declare_dependency( + include_directories: include_directories('.') +) diff --git a/test cases/failing/65 subproj different versions/test.json b/test cases/failing/65 subproj different versions/test.json new file mode 100644 index 0000000..2f9f70d --- /dev/null +++ b/test cases/failing/65 subproj different versions/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/65 subproj different versions/subprojects/b/meson.build:3:0: ERROR: Dependency 'c' is required but not found." + } + ] +} |