From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- .../common/174 ndebug if-release enabled/main.c | 15 +++++++++++++++ .../common/174 ndebug if-release enabled/meson.build | 7 +++++++ 2 files changed, 22 insertions(+) create mode 100644 meson/test cases/common/174 ndebug if-release enabled/main.c create mode 100644 meson/test cases/common/174 ndebug if-release enabled/meson.build (limited to 'meson/test cases/common/174 ndebug if-release enabled') diff --git a/meson/test cases/common/174 ndebug if-release enabled/main.c b/meson/test cases/common/174 ndebug if-release enabled/main.c new file mode 100644 index 000000000..984ebcabe --- /dev/null +++ b/meson/test cases/common/174 ndebug if-release enabled/main.c @@ -0,0 +1,15 @@ +#include +#include + +int meson_test_side_effect = EXIT_FAILURE; + +int meson_test_set_side_effect(void) { + meson_test_side_effect = EXIT_SUCCESS; + return 1; +} + +int main(void) { + // meson_test_side_effect is set only if assert is executed + assert(meson_test_set_side_effect()); + return meson_test_side_effect; +} diff --git a/meson/test cases/common/174 ndebug if-release enabled/meson.build b/meson/test cases/common/174 ndebug if-release enabled/meson.build new file mode 100644 index 000000000..be263752a --- /dev/null +++ b/meson/test cases/common/174 ndebug if-release enabled/meson.build @@ -0,0 +1,7 @@ +project('ndebug enabled', 'c', + default_options : [ + 'buildtype=debugoptimized', + 'b_ndebug=if-release', + ]) + +test('exe', executable('main', 'main.c')) -- cgit 1.2.3-korg