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

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

Issue 1883093002: Add support for generating the QtCreator projects from GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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/import_manager.h" 5 #include "tools/gn/import_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "tools/gn/parse_tree.h" 10 #include "tools/gn/parse_tree.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 } 85 }
86 } 86 }
87 87
88 Scope::MergeOptions options; 88 Scope::MergeOptions options;
89 options.skip_private_vars = true; 89 options.skip_private_vars = true;
90 options.mark_dest_used = true; // Don't require all imported values be used. 90 options.mark_dest_used = true; // Don't require all imported values be used.
91 return imported_scope->NonRecursiveMergeTo(scope, options, node_for_err, 91 return imported_scope->NonRecursiveMergeTo(scope, options, node_for_err,
92 "import", err); 92 "import", err);
93 } 93 }
94
95 std::vector<SourceFile> ImportManager::GetImportedFiles() const {
96 std::vector<SourceFile> imported_files;
97 imported_files.resize(imports_.size());
98 std::transform(imports_.begin(), imports_.end(), imported_files.begin(),
99 [](const ImportMap::value_type& val) { return val.first; });
100 return imported_files;
101 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698