From 251f74dcf3fea706ed373b717257f82592b6a1de Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 4 Mar 2025 08:24:08 -0800 Subject: coredata: remove get_option_for_subproject This is just a wrapper around `OptionStore.get_option_for`, but without taking an `OptionKey`. This complicates the subproject passing, since `OptionKey` is designed to encapsulate the option name and subproject. --- mesonbuild/compilers/objcpp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/objcpp.py') diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py index 743bbb9cd..b38fdb60d 100644 --- a/mesonbuild/compilers/objcpp.py +++ b/mesonbuild/compilers/objcpp.py @@ -83,11 +83,11 @@ class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler): def get_option_compile_args(self, target: 'BuildTarget', env: 'Environment', subproject: T.Optional[str] = None) -> T.List[str]: args: T.List[str] = [] - key = OptionKey('cpp_std', machine=self.for_machine) + key = OptionKey('cpp_std', subproject=subproject, machine=self.for_machine) if target: std = env.coredata.get_option_for_target(target, key) else: - std = env.coredata.get_option_for_subproject(key, subproject) + std = env.coredata.optstore.get_value_for(key) assert isinstance(std, str) if std != 'none': args.append('-std=' + std) -- cgit v1.2.3