| 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 <map> |    8 #include <map> | 
|    9 #include <set> |    9 #include <set> | 
|   10 #include <string> |   10 #include <string> | 
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  252     if (target_cpu_value != nullptr && |  252     if (target_cpu_value != nullptr && | 
|  253         target_cpu_value->string_value() == "x64") |  253         target_cpu_value->string_value() == "x64") | 
|  254       config_platform = "x64"; |  254       config_platform = "x64"; | 
|  255   } |  255   } | 
|  256  |  256  | 
|  257   VisualStudioWriter writer(build_settings, config_platform, version); |  257   VisualStudioWriter writer(build_settings, config_platform, version); | 
|  258   writer.projects_.reserve(targets.size()); |  258   writer.projects_.reserve(targets.size()); | 
|  259   writer.folders_.reserve(targets.size()); |  259   writer.folders_.reserve(targets.size()); | 
|  260  |  260  | 
|  261   for (const Target* target : targets) { |  261   for (const Target* target : targets) { | 
|  262     // Skip actions and groups. |  262     // Skip actions, groups and bundle targets. | 
|  263     if (target->output_type() == Target::GROUP || |  263     if (target->output_type() == Target::GROUP || | 
|  264         target->output_type() == Target::COPY_FILES || |  264         target->output_type() == Target::COPY_FILES || | 
|  265         target->output_type() == Target::ACTION || |  265         target->output_type() == Target::ACTION || | 
|  266         target->output_type() == Target::ACTION_FOREACH) { |  266         target->output_type() == Target::ACTION_FOREACH || | 
 |  267         target->output_type() == Target::BUNDLE_DATA) { | 
|  267       continue; |  268       continue; | 
|  268     } |  269     } | 
|  269  |  270  | 
|  270     if (!writer.WriteProjectFiles(target, err)) |  271     if (!writer.WriteProjectFiles(target, err)) | 
|  271       return false; |  272       return false; | 
|  272   } |  273   } | 
|  273  |  274  | 
|  274   if (writer.projects_.empty()) { |  275   if (writer.projects_.empty()) { | 
|  275     *err = Err(Location(), "No Visual Studio projects generated."); |  276     *err = Err(Location(), "No Visual Studio projects generated."); | 
|  276     return false; |  277     return false; | 
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  790   } |  791   } | 
|  791 } |  792 } | 
|  792  |  793  | 
|  793 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) { |  794 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) { | 
|  794   std::ostringstream ninja_target_out; |  795   std::ostringstream ninja_target_out; | 
|  795   DCHECK(!target->dependency_output_file().value().empty()); |  796   DCHECK(!target->dependency_output_file().value().empty()); | 
|  796   ninja_path_output_.WriteFile(ninja_target_out, |  797   ninja_path_output_.WriteFile(ninja_target_out, | 
|  797                                target->dependency_output_file()); |  798                                target->dependency_output_file()); | 
|  798   return ninja_target_out.str(); |  799   return ninja_target_out.str(); | 
|  799 } |  800 } | 
| OLD | NEW |