OLD | NEW |
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 VisualStudioWriter::SolutionEntry::~SolutionEntry() = default; | 174 VisualStudioWriter::SolutionEntry::~SolutionEntry() = default; |
175 | 175 |
176 VisualStudioWriter::SolutionProject::SolutionProject( | 176 VisualStudioWriter::SolutionProject::SolutionProject( |
177 const std::string& _name, | 177 const std::string& _name, |
178 const std::string& _path, | 178 const std::string& _path, |
179 const std::string& _guid, | 179 const std::string& _guid, |
180 const std::string& _label_dir_path, | 180 const std::string& _label_dir_path, |
181 const std::string& _config_platform) | 181 const std::string& _config_platform) |
182 : SolutionEntry(_name, _path, _guid), | 182 : SolutionEntry(_name, _path, _guid), |
183 label_dir_path(_label_dir_path), | 183 label_dir_path(_label_dir_path), |
184 config_platform(_config_platform) {} | 184 config_platform(_config_platform) { |
| 185 // Make sure all paths use the same drive letter case. This is especially |
| 186 // important when searching for the common path prefix. |
| 187 label_dir_path[0] = base::ToUpperASCII(label_dir_path[0]); |
| 188 } |
185 | 189 |
186 VisualStudioWriter::SolutionProject::~SolutionProject() = default; | 190 VisualStudioWriter::SolutionProject::~SolutionProject() = default; |
187 | 191 |
188 VisualStudioWriter::VisualStudioWriter(const BuildSettings* build_settings, | 192 VisualStudioWriter::VisualStudioWriter(const BuildSettings* build_settings, |
189 const char* config_platform, | 193 const char* config_platform, |
190 Version version) | 194 Version version) |
191 : build_settings_(build_settings), | 195 : build_settings_(build_settings), |
192 config_platform_(config_platform), | 196 config_platform_(config_platform), |
193 ninja_path_output_(build_settings->build_dir(), | 197 ninja_path_output_(build_settings->build_dir(), |
194 build_settings->root_path_utf8(), | 198 build_settings->root_path_utf8(), |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 } | 804 } |
801 } | 805 } |
802 | 806 |
803 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) { | 807 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) { |
804 std::ostringstream ninja_target_out; | 808 std::ostringstream ninja_target_out; |
805 DCHECK(!target->dependency_output_file().value().empty()); | 809 DCHECK(!target->dependency_output_file().value().empty()); |
806 ninja_path_output_.WriteFile(ninja_target_out, | 810 ninja_path_output_.WriteFile(ninja_target_out, |
807 target->dependency_output_file()); | 811 target->dependency_output_file()); |
808 return ninja_target_out.str(); | 812 return ninja_target_out.str(); |
809 } | 813 } |
OLD | NEW |