diff options
Diffstat (limited to 'meson/test cases/common/131 override options')
5 files changed, 31 insertions, 0 deletions
diff --git a/meson/test cases/common/131 override options/four.c b/meson/test cases/common/131 override options/four.c new file mode 100644 index 000000000..44e344f72 --- /dev/null +++ b/meson/test cases/common/131 override options/four.c @@ -0,0 +1,9 @@ +int func(void); + +static int duplicate_func(void) { + return -4; +} + +int main(void) { + return duplicate_func() + func(); +} diff --git a/meson/test cases/common/131 override options/meson.build b/meson/test cases/common/131 override options/meson.build new file mode 100644 index 000000000..4dd8d797e --- /dev/null +++ b/meson/test cases/common/131 override options/meson.build @@ -0,0 +1,6 @@ +project('option override', 'c', + default_options : 'unity=on') + +executable('mustunity', 'one.c', 'two.c') +executable('notunity', 'three.c', 'four.c', + override_options : ['unity=off']) diff --git a/meson/test cases/common/131 override options/one.c b/meson/test cases/common/131 override options/one.c new file mode 100644 index 000000000..6120d4889 --- /dev/null +++ b/meson/test cases/common/131 override options/one.c @@ -0,0 +1,3 @@ +static int hidden_func(void) { + return 0; +} diff --git a/meson/test cases/common/131 override options/three.c b/meson/test cases/common/131 override options/three.c new file mode 100644 index 000000000..094260e04 --- /dev/null +++ b/meson/test cases/common/131 override options/three.c @@ -0,0 +1,7 @@ +static int duplicate_func(void) { + return 4; +} + +int func(void) { + return duplicate_func(); +} diff --git a/meson/test cases/common/131 override options/two.c b/meson/test cases/common/131 override options/two.c new file mode 100644 index 000000000..0f8048c21 --- /dev/null +++ b/meson/test cases/common/131 override options/two.c @@ -0,0 +1,6 @@ +/* + * Requires a Unity build. Otherwise hidden_func is not specified. + */ +int main(void) { + return hidden_func(); +} |