diff options
Diffstat (limited to 'meson/test cases/failing build/1 vala c werror')
3 files changed, 25 insertions, 0 deletions
diff --git a/meson/test cases/failing build/1 vala c werror/meson.build b/meson/test cases/failing build/1 vala c werror/meson.build new file mode 100644 index 000000000..736d7aa43 --- /dev/null +++ b/meson/test cases/failing build/1 vala c werror/meson.build @@ -0,0 +1,10 @@ +project('valatest', 'c', default_options : 'werror=true') + +if find_program('valac', required : false).found() + add_languages('vala') + valadeps = [dependency('glib-2.0'), dependency('gobject-2.0')] + # Must fail due to -Werror and unused variable in C file + executable('valaprog', 'prog.vala', 'unused-var.c', dependencies : valadeps) +else + executable('failprog', 'unused-var.c') +endif diff --git a/meson/test cases/failing build/1 vala c werror/prog.vala b/meson/test cases/failing build/1 vala c werror/prog.vala new file mode 100644 index 000000000..638e77660 --- /dev/null +++ b/meson/test cases/failing build/1 vala c werror/prog.vala @@ -0,0 +1,7 @@ +class MainProg : GLib.Object { + + public static int main(string[] args) { + stdout.printf("Vala is working.\n"); + return 0; + } +} diff --git a/meson/test cases/failing build/1 vala c werror/unused-var.c b/meson/test cases/failing build/1 vala c werror/unused-var.c new file mode 100644 index 000000000..6b85078c9 --- /dev/null +++ b/meson/test cases/failing build/1 vala c werror/unused-var.c @@ -0,0 +1,8 @@ +#warning "something" + +int +somelib(void) +{ + int unused_var; + return 33; +} |