(self, arguments: T.Union[str, T.List[str]],
                           mode: _TestMode = _TestMode.COMPILER)
return result
Shared implementation for methods checking compiler and linker arguments.
Shared implementation for methods checking compiler and linker arguments.
Shared implementation for methods checking compiler and linker arguments .
def _has_argument_impl(self, arguments: T.Union[str, T.List[str]],
                           mode: _TestMode = _TestMode.COMPILER) -> bool:
        """Shared implementation for methods checking compiler and linker arguments."""
        # This simplifies the callers
        if isinstance(arguments, str):
            arguments = [arguments]
        test = self.compiler.has_multi_link_arguments if mode is _TestMode.LINKER else self.compiler.has_multi_arguments
        result, cached = test(arguments, self.environment)
        cached_msg = mlog.blue('(cached)') if cached else ''
        mlog.log(
            'Compiler for',
            self.compiler.get_display_language(),
            'supports{}'.format(' link' if mode is _TestMode.LINKER else ''),
            'arguments {}:'.format(' '.join(arguments)),
            mlog.green('YES') if result else mlog.red('NO'),
            cached_msg)
        return result
def _has_argument_impl ( self , arguments : T . Union [ str , T . List [ str ] ] , mode : _TestMode = _TestMode . COMPILER ) -> bool : # This simplifies the callers if isinstance ( arguments , str ) : arguments = [ arguments ] test = self . compiler . has_multi_link_arguments if mode is _TestMode . LINKER else self . compiler . has_multi_arguments result , cached = test ( arguments , self . environment ) cached_msg = mlog . blue ( '(cached)' ) if cached else '' mlog . log ( 'Compiler for' , self . compiler . get_display_language ( ) , 'supports{}' . format ( ' link' if mode is _TestMode . LINKER else '' ) , 'arguments {}:' . format ( ' ' . join ( arguments ) ) , mlog . green ( 'YES' ) if result else mlog . red ( 'NO' ) , cached_msg ) return result