34 lines · python
1# -*- Python -*-2 3import os4 5# Setup config name.6config.name = "Builtins"7 8# Setup source root.9config.test_source_root = os.path.dirname(__file__)10 11# Test suffixes.12config.suffixes = [".c", ".cpp", ".m", ".mm", ".test"]13extra_flags = ["-Wall"]14if config.compiler_id == "GNU":15 # detect incorrect declarations of libgcc functions16 extra_flags.append("-Werror=builtin-declaration-mismatch")17 18 19# Define %clang and %clangxx substitutions to use in test RUN lines.20config.substitutions.append(21 ("%clang ", " " + config.clang + " " + " ".join(extra_flags) + " ")22)23 24if config.target_os == "Darwin":25 config.substitutions.append(26 ("%macos_version_major", str(config.darwin_osx_version[0]))27 )28 config.substitutions.append(29 ("%macos_version_minor", str(config.darwin_osx_version[1]))30 )31 config.substitutions.append(32 ("%macos_version_subminor", str(config.darwin_osx_version[2]))33 )34