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

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

Issue 909103003: gn: Add 'clean' command. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Err instead of DeleteFile Created 5 years, 10 months 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/commands.h ('k') | tools/gn/gn.gyp » ('j') | 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/commands.h" 5 #include "tools/gn/commands.h"
6 #include "tools/gn/filesystem_utils.h" 6 #include "tools/gn/filesystem_utils.h"
7 #include "tools/gn/item.h" 7 #include "tools/gn/item.h"
8 #include "tools/gn/label.h" 8 #include "tools/gn/label.h"
9 #include "tools/gn/label_pattern.h" 9 #include "tools/gn/label_pattern.h"
10 #include "tools/gn/setup.h" 10 #include "tools/gn/setup.h"
(...skipping 19 matching lines...) Expand all
30 const CommandInfoMap& GetCommands() { 30 const CommandInfoMap& GetCommands() {
31 static CommandInfoMap info_map; 31 static CommandInfoMap info_map;
32 if (info_map.empty()) { 32 if (info_map.empty()) {
33 #define INSERT_COMMAND(cmd) \ 33 #define INSERT_COMMAND(cmd) \
34 info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, \ 34 info_map[k##cmd] = CommandInfo(k##cmd##_HelpShort, \
35 k##cmd##_Help, \ 35 k##cmd##_Help, \
36 &Run##cmd); 36 &Run##cmd);
37 37
38 INSERT_COMMAND(Args) 38 INSERT_COMMAND(Args)
39 INSERT_COMMAND(Check) 39 INSERT_COMMAND(Check)
40 INSERT_COMMAND(Clean)
40 INSERT_COMMAND(Desc) 41 INSERT_COMMAND(Desc)
41 INSERT_COMMAND(Gen) 42 INSERT_COMMAND(Gen)
42 INSERT_COMMAND(Format) 43 INSERT_COMMAND(Format)
43 INSERT_COMMAND(Help) 44 INSERT_COMMAND(Help)
44 INSERT_COMMAND(Ls) 45 INSERT_COMMAND(Ls)
45 INSERT_COMMAND(Refs) 46 INSERT_COMMAND(Refs)
46 47
47 #undef INSERT_COMMAND 48 #undef INSERT_COMMAND
48 } 49 }
49 return info_map; 50 return info_map;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 112 }
112 113
113 std::vector<LabelPattern> pattern_vector; 114 std::vector<LabelPattern> pattern_vector;
114 pattern_vector.push_back(pattern); 115 pattern_vector.push_back(pattern);
115 FilterTargetsByPatterns(setup->builder()->GetAllResolvedTargets(), 116 FilterTargetsByPatterns(setup->builder()->GetAllResolvedTargets(),
116 pattern_vector, matches); 117 pattern_vector, matches);
117 return true; 118 return true;
118 } 119 }
119 120
120 } // namespace commands 121 } // namespace commands
OLDNEW
« no previous file with comments | « tools/gn/commands.h ('k') | tools/gn/gn.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698