Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: tools/gn/variables.cc

Issue 778513003: gn: Employ the same INSERT_VARIABLE macro trick for switches.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: empty string Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tools/gn/switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698