summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/objcpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/objcpp.py')
-rw-r--r--mesonbuild/compilers/objcpp.py4
1 files changed, 2 insertions, 2 deletions
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)