(compiler, flagname)
return True
Return a boolean indicating whether a flag name is supported on
    the specified compiler.
Return a boolean indicating whether a flag name is supported on
    the specified compiler.
Return a boolean indicating whether a flag name is supported on the specified compiler .
def has_flag(compiler, flagname):
    """Return a boolean indicating whether a flag name is supported on
    the specified compiler.
    """
    import tempfile
    with tempfile.NamedTemporaryFile('w', suffix='.cpp', delete=False) as f:
        f.write('int main (int argc, char **argv) { return 0; }')
        fname = f.name
    try:
        compiler.compile([fname], extra_postargs=[flagname])
    except setuptools.distutils.errors.CompileError:
        return False
    return True
def has_flag ( compiler , flagname ) : import tempfile with tempfile . NamedTemporaryFile ( 'w' , suffix = '.cpp' , delete = False ) as f : f . write ( 'int main (int argc, char **argv) { return 0; }' ) fname = f . name try : compiler . compile ( [ fname ] , extra_postargs = [ flagname ] ) except setuptools . distutils . errors . CompileError : return False return True