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

Unified Diff: tools/gn/visual_studio_writer.cc

Issue 1819353002: Convert GN group targets to Visual Studio projects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | 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 801ea7761d4e646d21baa36e3171f2410c7f85cc..4c88f35dace35f2841855ea8bbf6869a1f814edc 100644
--- a/tools/gn/visual_studio_writer.cc
+++ b/tools/gn/visual_studio_writer.cc
@@ -125,6 +125,8 @@ std::string GetConfigurationType(const Target* target, Err* err) {
case Target::STATIC_LIBRARY:
case Target::SOURCE_SET:
return "StaticLibrary";
+ case Target::GROUP:
+ return "Utility";
default:
*err = Err(Location(),
@@ -259,9 +261,8 @@ bool VisualStudioWriter::RunAndWriteFiles(const BuildSettings* build_settings,
writer.folders_.reserve(targets.size());
for (const Target* target : targets) {
- // Skip actions, groups and bundle targets.
- if (target->output_type() == Target::GROUP ||
- target->output_type() == Target::COPY_FILES ||
+ // Skip actions and bundle targets.
+ if (target->output_type() == Target::COPY_FILES ||
target->output_type() == Target::ACTION ||
target->output_type() == Target::ACTION_FOREACH ||
target->output_type() == Target::BUNDLE_DATA) {
@@ -424,11 +425,13 @@ bool VisualStudioWriter::WriteProjectFileContents(
scoped_ptr<XmlElementWriter> out_dir = properties->SubElement("OutDir");
path_output.WriteDir(out_dir->StartContent(false),
build_settings_->build_dir(),
- PathOutput::DIR_INCLUDE_LAST_SLASH);
+ PathOutput::DIR_NO_LAST_SLASH);
}
properties->SubElement("TargetName")->Text("$(ProjectName)");
- properties->SubElement("TargetPath")
- ->Text("$(OutDir)\\$(ProjectName)$(TargetExt)");
+ if (target->output_type() != Target::GROUP) {
+ properties->SubElement("TargetPath")
+ ->Text("$(OutDir)\\$(ProjectName)$(TargetExt)");
+ }
}
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698