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

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

Issue 2018733003: Fix Visual Studio warning on single file compilation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/visual_studio_writer.h" 5 #include "tools/gn/visual_studio_writer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 project.SubElement("PropertyGroup", XmlAttributes("Label", "UserMacros")); 425 project.SubElement("PropertyGroup", XmlAttributes("Label", "UserMacros"));
426 426
427 { 427 {
428 std::unique_ptr<XmlElementWriter> properties = 428 std::unique_ptr<XmlElementWriter> properties =
429 project.SubElement("PropertyGroup"); 429 project.SubElement("PropertyGroup");
430 { 430 {
431 std::unique_ptr<XmlElementWriter> out_dir = 431 std::unique_ptr<XmlElementWriter> out_dir =
432 properties->SubElement("OutDir"); 432 properties->SubElement("OutDir");
433 path_output.WriteDir(out_dir->StartContent(false), 433 path_output.WriteDir(out_dir->StartContent(false),
434 build_settings_->build_dir(), 434 build_settings_->build_dir(),
435 PathOutput::DIR_NO_LAST_SLASH); 435 PathOutput::DIR_INCLUDE_LAST_SLASH);
436 } 436 }
437 properties->SubElement("TargetName")->Text("$(ProjectName)"); 437 properties->SubElement("TargetName")->Text("$(ProjectName)");
438 if (target->output_type() != Target::GROUP) { 438 if (target->output_type() != Target::GROUP) {
439 properties->SubElement("TargetPath") 439 properties->SubElement("TargetPath")
440 ->Text("$(OutDir)\\$(ProjectName)$(TargetExt)"); 440 ->Text("$(OutDir)\\$(ProjectName)$(TargetExt)");
441 } 441 }
442 } 442 }
443 443
444 { 444 {
445 std::unique_ptr<XmlElementWriter> item_definitions = 445 std::unique_ptr<XmlElementWriter> item_definitions =
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 } 800 }
801 } 801 }
802 802
803 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) { 803 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) {
804 std::ostringstream ninja_target_out; 804 std::ostringstream ninja_target_out;
805 DCHECK(!target->dependency_output_file().value().empty()); 805 DCHECK(!target->dependency_output_file().value().empty());
806 ninja_path_output_.WriteFile(ninja_target_out, 806 ninja_path_output_.WriteFile(ninja_target_out,
807 target->dependency_output_file()); 807 target->dependency_output_file());
808 return ninja_target_out.str(); 808 return ninja_target_out.str();
809 } 809 }
OLDNEW
« 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