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

Unified Diff: tools/gn/visual_studio_writer.cc

Issue 1827103005: [GN] Add support for generating Xcode projects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve comment about "assert(product_type != "")" 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/variables.cc ('k') | tools/gn/xcode_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/visual_studio_writer.cc
diff --git a/tools/gn/visual_studio_writer.cc b/tools/gn/visual_studio_writer.cc
index 87dfa8164d75e19f92cef28121794a3ae36aff23..50d6878a5f194355494fd96e831a5e2e6993f2ab 100644
--- a/tools/gn/visual_studio_writer.cc
+++ b/tools/gn/visual_studio_writer.cc
@@ -12,7 +12,6 @@
#include <string>
#include "base/logging.h"
-#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "tools/gn/builder.h"
@@ -237,18 +236,10 @@ bool VisualStudioWriter::RunAndWriteFiles(const BuildSettings* build_settings,
if (dir_filters.empty()) {
targets = builder->GetAllResolvedTargets();
} else {
- std::vector<std::string> tokens = base::SplitString(
- dir_filters, ";", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
- SourceDir root_dir =
- SourceDirForCurrentDirectory(build_settings->root_path());
-
std::vector<LabelPattern> filters;
- for (const std::string& token : tokens) {
- LabelPattern pattern =
- LabelPattern::GetPattern(root_dir, Value(nullptr, token), err);
- if (err->has_error())
- return false;
- filters.push_back(pattern);
+ if (!commands::FilterPatternsFromString(build_settings, dir_filters,
+ &filters, err)) {
+ return false;
}
commands::FilterTargetsByPatterns(builder->GetAllResolvedTargets(), filters,
« no previous file with comments | « tools/gn/variables.cc ('k') | tools/gn/xcode_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698