1# Copyright (c) 2012 Google Inc. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4{ 5 'target_defaults': { 6 'xcode_settings': { 7 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', 8 }, 9 }, 10 11 'variables': { 12 # Non-failing tests should check that these trivial files in every language 13 # still compile correctly. 14 'valid_sources': [ 15 'valid_c.c', 16 'valid_cc.cc', 17 'valid_m.m', 18 'valid_mm.mm', 19 ], 20 }, 21 22 # Targets come in pairs: 'foo' and 'foo-fail', with the former building with 23 # no warnings and the latter not. 24 'targets': [ 25 # GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO (default: YES): 26 { 27 'target_name': 'warn_about_invalid_offsetof_macro', 28 'type': 'executable', 29 'sources': [ 30 'warn_about_invalid_offsetof_macro.cc', 31 '<@(valid_sources)', 32 ], 33 'xcode_settings': { 34 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'NO', 35 }, 36 }, 37 { 38 'target_name': 'warn_about_invalid_offsetof_macro-fail', 39 'type': 'executable', 40 'sources': [ 'warn_about_invalid_offsetof_macro.cc', ], 41 }, 42 # GCC_WARN_ABOUT_MISSING_NEWLINE (default: NO): 43 { 44 'target_name': 'warn_about_missing_newline', 45 'type': 'executable', 46 'sources': [ 47 'warn_about_missing_newline.c', 48 '<@(valid_sources)', 49 ], 50 }, 51 { 52 'target_name': 'warn_about_missing_newline-fail', 53 'type': 'executable', 54 'sources': [ 'warn_about_missing_newline.c', ], 55 'xcode_settings': { 56 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', 57 }, 58 }, 59 ], 60} 61