Home | History | Annotate | Download | only in cflags
      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   'targets': [
      6     {
      7       'target_name': 'mytarget',
      8       'type': 'shared_library',
      9       'sources': [
     10         'cfile.c',
     11         'mfile.m',
     12         'ccfile.cc',
     13         'cppfile.cpp',
     14         'cxxfile.cxx',
     15         'mmfile.mm',
     16       ],
     17       'xcode_settings': {
     18         # Normally, defines would go in 'defines' instead. This is just for
     19         # testing.
     20         'OTHER_CFLAGS': [
     21           '-DCFLAG',
     22         ],
     23         'OTHER_CPLUSPLUSFLAGS': [
     24           '-DCCFLAG',
     25         ],
     26         'GCC_C_LANGUAGE_STANDARD': 'c99',
     27       },
     28     },
     29     {
     30       'target_name': 'mytarget_reuse_cflags',
     31       'type': 'shared_library',
     32       'sources': [
     33         'cfile.c',
     34         'mfile.m',
     35         'ccfile_withcflags.cc',
     36         'cppfile_withcflags.cpp',
     37         'cxxfile_withcflags.cxx',
     38         'mmfile_withcflags.mm',
     39       ],
     40       'xcode_settings': {
     41         'OTHER_CFLAGS': [
     42           '-DCFLAG',
     43         ],
     44         'OTHER_CPLUSPLUSFLAGS': [
     45           '$OTHER_CFLAGS',
     46           '-DCCFLAG',
     47         ],
     48         # This is a C-only flag, to check these don't get added to C++ files.
     49         'GCC_C_LANGUAGE_STANDARD': 'c99',
     50       },
     51     },
     52     {
     53       'target_name': 'mytarget_inherit_cflags',
     54       'type': 'shared_library',
     55       'sources': [
     56         'cfile.c',
     57         'mfile.m',
     58         'ccfile_withcflags.cc',
     59         'cppfile_withcflags.cpp',
     60         'cxxfile_withcflags.cxx',
     61         'mmfile_withcflags.mm',
     62       ],
     63       'xcode_settings': {
     64         'OTHER_CFLAGS': [
     65           '-DCFLAG',
     66         ],
     67         'OTHER_CPLUSPLUSFLAGS': [
     68           '$inherited',
     69           '-DCCFLAG',
     70         ],
     71         'GCC_C_LANGUAGE_STANDARD': 'c99',
     72       },
     73     },
     74     {
     75       'target_name': 'mytarget_inherit_cflags_parens',
     76       'type': 'shared_library',
     77       'sources': [
     78         'cfile.c',
     79         'mfile.m',
     80         'ccfile_withcflags.cc',
     81         'cppfile_withcflags.cpp',
     82         'cxxfile_withcflags.cxx',
     83         'mmfile_withcflags.mm',
     84       ],
     85       'xcode_settings': {
     86         'OTHER_CFLAGS': [
     87           '-DCFLAG',
     88         ],
     89         'OTHER_CPLUSPLUSFLAGS': [
     90           '$(inherited)',
     91           '-DCCFLAG',
     92         ],
     93         'GCC_C_LANGUAGE_STANDARD': 'c99',
     94       },
     95     },
     96     {
     97       'target_name': 'mytarget_inherit_cflags_braces',
     98       'type': 'shared_library',
     99       'sources': [
    100         'cfile.c',
    101         'mfile.m',
    102         'ccfile_withcflags.cc',
    103         'cppfile_withcflags.cpp',
    104         'cxxfile_withcflags.cxx',
    105         'mmfile_withcflags.mm',
    106       ],
    107       'xcode_settings': {
    108         'OTHER_CFLAGS': [
    109           '-DCFLAG',
    110         ],
    111         'OTHER_CPLUSPLUSFLAGS': [
    112           '${inherited}',
    113           '-DCCFLAG',
    114         ],
    115         'GCC_C_LANGUAGE_STANDARD': 'c99',
    116       },
    117     },
    118     {
    119       'target_name': 'ansi_standard',
    120       'type': 'shared_library',
    121       'sources': [
    122         'cfile.c',
    123       ],
    124       'xcode_settings': {
    125         'OTHER_CFLAGS': [
    126           '-DCFLAG',
    127         ],
    128         'GCC_C_LANGUAGE_STANDARD': 'ansi',
    129       },
    130     },
    131   ],
    132 }
    133