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

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

Issue 1155303008: Allow directories for GN data lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@path
Patch Set: add dir test Created 5 years, 6 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 | « no previous file | tools/gn/output_file.h » ('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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 for (const auto& cur_file : target->public_headers()) { 132 for (const auto& cur_file : target->public_headers()) {
133 if (cur_file == file) 133 if (cur_file == file)
134 return true; 134 return true;
135 } 135 }
136 for (const auto& cur_file : target->inputs()) { 136 for (const auto& cur_file : target->inputs()) {
137 if (cur_file == file) 137 if (cur_file == file)
138 return true; 138 return true;
139 } 139 }
140 for (const auto& cur_file : target->data()) { 140 for (const auto& cur_file : target->data()) {
141 if (cur_file == file) 141 if (cur_file == file.value())
142 return true; 142 return true;
143 } 143 }
144 return false; 144 return false;
145 } 145 }
146 146
147 void GetTargetsContainingFile(Setup* setup, 147 void GetTargetsContainingFile(Setup* setup,
148 const std::vector<const Target*>& all_targets, 148 const std::vector<const Target*>& all_targets,
149 const SourceFile& file, 149 const SourceFile& file,
150 bool all_toolchains, 150 bool all_toolchains,
151 UniqueVector<const Target*>* matches) { 151 UniqueVector<const Target*>* matches) {
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 // If you ask for the references of a valid target, but that target has 475 // If you ask for the references of a valid target, but that target has
476 // nothing referencing it, we'll get here without having printed anything. 476 // nothing referencing it, we'll get here without having printed anything.
477 if (!quiet && cnt == 0) 477 if (!quiet && cnt == 0)
478 OutputString("Nothing references this.\n", DECORATION_YELLOW); 478 OutputString("Nothing references this.\n", DECORATION_YELLOW);
479 479
480 return 0; 480 return 0;
481 } 481 }
482 482
483 } // namespace commands 483 } // namespace commands
OLDNEW
« no previous file with comments | « no previous file | tools/gn/output_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698