OLD | NEW |
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 # .gyp files should set chromium_code to 1 if they build Chromium-specific | 7 # .gyp files should set chromium_code to 1 if they build Chromium-specific |
8 # code, as opposed to external code. This variable is used to control | 8 # code, as opposed to external code. This variable is used to control |
9 # such things as the set of warnings to enable, and whether warnings are | 9 # such things as the set of warnings to enable, and whether warnings are |
10 # treated as errors. | 10 # treated as errors. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', | 65 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', |
66 }, | 66 }, |
67 # Add -lgcov for executables, not for static_libraries. | 67 # Add -lgcov for executables, not for static_libraries. |
68 # This is a delayed conditional. | 68 # This is a delayed conditional. |
69 'target_conditions': [ | 69 'target_conditions': [ |
70 ['_type=="executable"', { | 70 ['_type=="executable"', { |
71 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, | 71 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, |
72 }], | 72 }], |
73 ], | 73 ], |
74 }], | 74 }], |
75 # TODO(jrg): complete this work once Linux transitions to gyp. | 75 # Linux gyp (into scons) doesn't like target_conditions? |
76 # This is untested (--> likely doesn't work). | 76 # TODO(???): track down why 'target_conditions' doesn't work |
| 77 # on Linux gyp into scons like it does on Mac gyp into xcodeproj. |
77 ['OS=="linux"', { | 78 ['OS=="linux"', { |
78 'cflags': [ '-ftest-coverage', | 79 'cflags': [ '-ftest-coverage', |
79 '-fprofile-arcs' ], | 80 '-fprofile-arcs' ], |
80 'target_conditions': [ | 81 'link_settings': { 'libraries': [ '-lgcov' ] }, |
81 ['_type=="executable"', { | |
82 'link_settings': { 'libraries': [ '-lgcov' ] }, | |
83 }], | |
84 ], | |
85 }], | 82 }], |
86 ]}, | 83 ]}, |
87 # TODO(jrg): options for code coverage on Windows | 84 # TODO(jrg): options for code coverage on Windows |
88 ], | 85 ], |
89 ], | 86 ], |
90 'default_configuration': 'Debug', | 87 'default_configuration': 'Debug', |
91 'configurations': { | 88 'configurations': { |
92 'Debug': { | 89 'Debug': { |
93 'conditions': [ | 90 'conditions': [ |
94 [ 'OS=="mac"', { | 91 [ 'OS=="mac"', { |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 # settings in target dicts. SYMROOT is a special case, because many other | 430 # settings in target dicts. SYMROOT is a special case, because many other |
434 # Xcode variables depend on it, including variables such as | 431 # Xcode variables depend on it, including variables such as |
435 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 432 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
436 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 433 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
437 # files to appear (when present) in the UI as actual files and not red | 434 # files to appear (when present) in the UI as actual files and not red |
438 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 435 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
439 # and therefore SYMROOT, needs to be set at the project level. | 436 # and therefore SYMROOT, needs to be set at the project level. |
440 'SYMROOT': '<(DEPTH)/xcodebuild', | 437 'SYMROOT': '<(DEPTH)/xcodebuild', |
441 }, | 438 }, |
442 } | 439 } |
OLD | NEW |