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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 " Just these specific targets:\n" | 953 " Just these specific targets:\n" |
954 " visibility = [ \":mything\", \"//foo:something_else\" ]\n" | 954 " visibility = [ \":mything\", \"//foo:something_else\" ]\n" |
955 "\n" | 955 "\n" |
956 " Any target in the current directory and any subdirectory thereof, plus\n" | 956 " Any target in the current directory and any subdirectory thereof, plus\n" |
957 " any targets in \"//bar/\" and any subdirectory thereof.\n" | 957 " any targets in \"//bar/\" and any subdirectory thereof.\n" |
958 " visibility = [ \"./*\", \"//bar/*\" ]\n"; | 958 " visibility = [ \"./*\", \"//bar/*\" ]\n"; |
959 | 959 |
960 // ----------------------------------------------------------------------------- | 960 // ----------------------------------------------------------------------------- |
961 | 961 |
962 VariableInfo::VariableInfo() | 962 VariableInfo::VariableInfo() |
963 : help_short(NULL), | 963 : help_short(""), |
964 help(NULL) { | 964 help("") { |
965 } | 965 } |
966 | 966 |
967 VariableInfo::VariableInfo(const char* in_help_short, const char* in_help) | 967 VariableInfo::VariableInfo(const char* in_help_short, const char* in_help) |
968 : help_short(in_help_short), | 968 : help_short(in_help_short), |
969 help(in_help) { | 969 help(in_help) { |
970 } | 970 } |
971 | 971 |
972 #define INSERT_VARIABLE(var) \ | 972 #define INSERT_VARIABLE(var) \ |
973 info_map[k##var] = VariableInfo(k##var##_HelpShort, k##var##_Help); | 973 info_map[k##var] = VariableInfo(k##var##_HelpShort, k##var##_Help); |
974 | 974 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 INSERT_VARIABLE(Sources) | 1026 INSERT_VARIABLE(Sources) |
1027 INSERT_VARIABLE(Testonly) | 1027 INSERT_VARIABLE(Testonly) |
1028 INSERT_VARIABLE(Visibility) | 1028 INSERT_VARIABLE(Visibility) |
1029 } | 1029 } |
1030 return info_map; | 1030 return info_map; |
1031 } | 1031 } |
1032 | 1032 |
1033 #undef INSERT_VARIABLE | 1033 #undef INSERT_VARIABLE |
1034 | 1034 |
1035 } // namespace variables | 1035 } // namespace variables |
OLD | NEW |