# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
"""
Verifies that xcode-style GCC_... settings are handled properly. """
def CompilerSupportsWarnAboutInvalidOffsetOfMacro(test): # "clang" does not support the "-Winvalid-offsetof" flag, and silently # ignore it. Starting with Xcode 5.0.0, "gcc" is just a "clang" binary with # some hard-coded include path hack, so use the output of "-v" to detect if # the compiler supports the flag or not. return'clang'notin CompilerVersion('/usr/bin/cc')
if sys.platform == 'darwin':
test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
# List of targets that'll pass. It expects targets of the same name with # '-fail' appended that'll fail to build.
targets = [ 'warn_about_missing_newline',
]
# clang doesn't warn on invalid offsetofs, it silently ignores # -Wno-invalid-offsetof. if CompilerSupportsWarnAboutInvalidOffsetOfMacro(test):
targets.append('warn_about_invalid_offsetof_macro')
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.