Skip to content

Commit

Permalink
compilers/objcpp: Use the GnuCPPStdMixin for ObjC++
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker committed Sep 6, 2024
1 parent 42c0747 commit f8d86c3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mesonbuild/compilers/objcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .mixins.clike import CLikeCompiler
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

if T.TYPE_CHECKING:
Expand Down Expand Up @@ -58,7 +58,7 @@ def get_options(self) -> coredata.MutableKeyedOptionDictType:
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,
Expand All @@ -76,6 +76,13 @@ def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_
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):

Expand Down

0 comments on commit f8d86c3

Please sign in to comment.