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

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

Issue 1811203003: [GN] Fix "gn gen --ide=vs" to ignore bundle_data targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fixes
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 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 <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
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
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 }
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