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

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

Issue 2858273002: GN: Fix single-file compilations in VS2017 projects (Closed)
Patch Set: Created 3 years, 7 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 429
430 { 430 {
431 std::unique_ptr<XmlElementWriter> globals = 431 std::unique_ptr<XmlElementWriter> globals =
432 project.SubElement("PropertyGroup", XmlAttributes("Label", "Globals")); 432 project.SubElement("PropertyGroup", XmlAttributes("Label", "Globals"));
433 globals->SubElement("ProjectGuid")->Text(solution_project.guid); 433 globals->SubElement("ProjectGuid")->Text(solution_project.guid);
434 globals->SubElement("Keyword")->Text("Win32Proj"); 434 globals->SubElement("Keyword")->Text("Win32Proj");
435 globals->SubElement("RootNamespace")->Text(target->label().name()); 435 globals->SubElement("RootNamespace")->Text(target->label().name());
436 globals->SubElement("IgnoreWarnCompileDuplicatedFilename")->Text("true"); 436 globals->SubElement("IgnoreWarnCompileDuplicatedFilename")->Text("true");
437 globals->SubElement("PreferredToolArchitecture")->Text("x64"); 437 globals->SubElement("PreferredToolArchitecture")->Text("x64");
438 globals->SubElement("WindowsTargetPlatformVersion")
439 ->Text(kWindowsKitsIncludeVersion);
438 } 440 }
439 441
440 project.SubElement( 442 project.SubElement(
441 "Import", XmlAttributes("Project", 443 "Import", XmlAttributes("Project",
442 "$(VCTargetsPath)\\Microsoft.Cpp.Default.props")); 444 "$(VCTargetsPath)\\Microsoft.Cpp.Default.props"));
443 445
444 { 446 {
445 std::unique_ptr<XmlElementWriter> configuration = project.SubElement( 447 std::unique_ptr<XmlElementWriter> configuration = project.SubElement(
446 "PropertyGroup", XmlAttributes("Label", "Configuration")); 448 "PropertyGroup", XmlAttributes("Label", "Configuration"));
447 configuration->SubElement("CharacterSet")->Text("Unicode"); 449 configuration->SubElement("CharacterSet")->Text("Unicode");
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 } 869 }
868 } 870 }
869 871
870 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) { 872 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) {
871 std::ostringstream ninja_target_out; 873 std::ostringstream ninja_target_out;
872 DCHECK(!target->dependency_output_file().value().empty()); 874 DCHECK(!target->dependency_output_file().value().empty());
873 ninja_path_output_.WriteFile(ninja_target_out, 875 ninja_path_output_.WriteFile(ninja_target_out,
874 target->dependency_output_file()); 876 target->dependency_output_file());
875 return ninja_target_out.str(); 877 return ninja_target_out.str();
876 } 878 }
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