From 3005eaa0210791897309a7b773a37d0f2b80add4 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 27 Feb 2025 15:43:00 -0800 Subject: tests: add a DSL test for get_option with an unset b_ option --- test cases/common/40 options/meson.build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test cases/common/40 options/meson.build b/test cases/common/40 options/meson.build index ed7668fde..3849d54ea 100644 --- a/test cases/common/40 options/meson.build +++ b/test cases/common/40 options/meson.build @@ -1,4 +1,13 @@ -project('options', 'c', meson_version : '>= 1.0.0') +# SPDX-License-Identifier: Apache-2.0 +# Copyright © 2025 Intel Corporation + +project('options', meson_version : '>= 1.0.0') + +# This must happen before any language is added, or we wont be sure that the +# compiler didn't cause b_lto to be initialized +assert(get_option('b_lto') == false, 'Unused b_ option does not have default value') + +add_languages('c', required : true) if get_option('testoption') != 'optval' error('Incorrect value to test option') -- cgit v1.2.3