OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "tools/gn/variables.h" | 5 #include "tools/gn/variables.h" |
6 | 6 |
7 namespace variables { | 7 namespace variables { |
8 | 8 |
9 // Built-in variables ---------------------------------------------------------- | 9 // Built-in variables ---------------------------------------------------------- |
10 | 10 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 "check_includes: [boolean] Controls whether a target's files are checked.\n" | 435 "check_includes: [boolean] Controls whether a target's files are checked.\n" |
436 "\n" | 436 "\n" |
437 " When true (the default), the \"gn check\" command (as well as\n" | 437 " When true (the default), the \"gn check\" command (as well as\n" |
438 " \"gn gen\" with the --check flag) will check this target's sources\n" | 438 " \"gn gen\" with the --check flag) will check this target's sources\n" |
439 " and headers for proper dependencies.\n" | 439 " and headers for proper dependencies.\n" |
440 "\n" | 440 "\n" |
441 " When false, the files in this target will be skipped by default.\n" | 441 " When false, the files in this target will be skipped by default.\n" |
442 " This does not affect other targets that depend on the current target,\n" | 442 " This does not affect other targets that depend on the current target,\n" |
443 " it just skips checking the includes of the current target's files.\n" | 443 " it just skips checking the includes of the current target's files.\n" |
444 "\n" | 444 "\n" |
| 445 "Controlling includes individually\n" |
| 446 "\n" |
| 447 " If only certain includes are problematic, you can annotate them\n" |
| 448 " individually rather than disabling header checking on an entire\n" |
| 449 " target. Add the string \"nogncheck\" to the include line:\n" |
| 450 "\n" |
| 451 " #include \"foo/something_weird.h\" // nogncheck (bug 12345)\n" |
| 452 "\n" |
| 453 " It is good form to include a reference to a bug (if the include is\n" |
| 454 " improper, or some other comment expressing why the header checker\n" |
| 455 " doesn't work for this particular case.\n" |
| 456 "\n" |
| 457 " The most common reason to need \"nogncheck\" is conditional includes.\n" |
| 458 " The header checker does not understand the preprocessor, so may flag\n" |
| 459 " some includes as improper even if the dependencies and #defines are\n" |
| 460 " always matched correctly:\n" |
| 461 "\n" |
| 462 " #if defined(ENABLE_DOOM_MELON)\n" |
| 463 " #include \"doom_melon/beam_controller.h\" // nogncheck\n" |
| 464 " #endif\n" |
| 465 "\n" |
445 "Example\n" | 466 "Example\n" |
446 "\n" | 467 "\n" |
447 " source_set(\"busted_includes\") {\n" | 468 " source_set(\"busted_includes\") {\n" |
448 " # This target's includes are messed up, exclude it from checking.\n" | 469 " # This target's includes are messed up, exclude it from checking.\n" |
449 " check_includes = false\n" | 470 " check_includes = false\n" |
450 " ...\n" | 471 " ...\n" |
451 " }\n"; | 472 " }\n"; |
452 | 473 |
453 const char kCompleteStaticLib[] = "complete_static_lib"; | 474 const char kCompleteStaticLib[] = "complete_static_lib"; |
454 const char kCompleteStaticLib_HelpShort[] = | 475 const char kCompleteStaticLib_HelpShort[] = |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 INSERT_VARIABLE(Sources) | 1221 INSERT_VARIABLE(Sources) |
1201 INSERT_VARIABLE(Testonly) | 1222 INSERT_VARIABLE(Testonly) |
1202 INSERT_VARIABLE(Visibility) | 1223 INSERT_VARIABLE(Visibility) |
1203 } | 1224 } |
1204 return info_map; | 1225 return info_map; |
1205 } | 1226 } |
1206 | 1227 |
1207 #undef INSERT_VARIABLE | 1228 #undef INSERT_VARIABLE |
1208 | 1229 |
1209 } // namespace variables | 1230 } // namespace variables |
OLD | NEW |