diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2024-09-06 10:10:52 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-01-27 09:38:53 -0800 |
| commit | d650f6eaa57fed940a65b1fa5c15286dc7200f96 (patch) | |
| tree | 85427811a2482945500c42e95edb3598ec33e9d1 /mesonbuild/compilers/objcpp.py | |
| parent | 4f314baaf638d6a566fa295b8779b4cf3ba6d96f (diff) | |
| download | meson-d650f6eaa57fed940a65b1fa5c15286dc7200f96.tar.gz | |
compilers/objcpp: Use the GnuCPPStdMixin for ObjC++
Diffstat (limited to 'mesonbuild/compilers/objcpp.py')
| -rw-r--r-- | mesonbuild/compilers/objcpp.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py index 9fd119690..c7af84b79 100644 --- a/mesonbuild/compilers/objcpp.py +++ b/mesonbuild/compilers/objcpp.py @@ -9,7 +9,7 @@ from ..options import OptionKey, UserStdOption from .cpp import ALL_STDS from .compilers import Compiler -from .mixins.gnu import GnuCompiler, gnu_common_warning_args, gnu_objc_warning_args +from .mixins.gnu import GnuCompiler, GnuCPPStds, gnu_common_warning_args, gnu_objc_warning_args from .mixins.clang import ClangCompiler, ClangCPPStds from .mixins.clike import CLikeCompiler @@ -56,7 +56,7 @@ class ObjCPPCompiler(CLikeCompiler, Compiler): return opts -class GnuObjCPPCompiler(GnuCompiler, ObjCPPCompiler): +class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler): def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool, info: 'MachineInfo', defines: T.Optional[T.Dict[str, str]] = None, @@ -74,6 +74,13 @@ class GnuObjCPPCompiler(GnuCompiler, ObjCPPCompiler): self.supported_warn_args(gnu_common_warning_args) + self.supported_warn_args(gnu_objc_warning_args))} + def get_option_compile_args(self, options: 'coredata.KeyedOptionDictType') -> T.List[str]: + args = [] + std = options.get_value(self.form_compileropt_key('std')) + if std != 'none': + args.append('-std=' + std) + return args + class ClangObjCPPCompiler(ClangCPPStds, ClangCompiler, ObjCPPCompiler): |
