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/xcode_writer.h" | 5 #include "tools/gn/xcode_writer.h" |
6 | 6 |
7 #include <iomanip> | 7 #include <iomanip> |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 318 |
319 void XcodeWriter::CreateSourcesProject( | 319 void XcodeWriter::CreateSourcesProject( |
320 const std::vector<const Target*>& targets, | 320 const std::vector<const Target*>& targets, |
321 const SourceDir& root_build_dir, | 321 const SourceDir& root_build_dir, |
322 const PBXAttributes& attributes, | 322 const PBXAttributes& attributes, |
323 const std::string& source_path, | 323 const std::string& source_path, |
324 const std::string& config_name, | 324 const std::string& config_name, |
325 TargetOsType target_os) { | 325 TargetOsType target_os) { |
326 std::vector<SourceFile> sources; | 326 std::vector<SourceFile> sources; |
327 for (const Target* target : targets) { | 327 for (const Target* target : targets) { |
328 if (!target->settings()->is_default()) | |
329 continue; | |
330 | |
331 for (const SourceFile& source : target->sources()) { | 328 for (const SourceFile& source : target->sources()) { |
332 if (source.is_system_absolute()) | 329 if (source.is_system_absolute()) |
333 continue; | 330 continue; |
334 | 331 |
335 if (IsStringInOutputDir(root_build_dir, source.value())) | 332 if (IsStringInOutputDir(root_build_dir, source.value())) |
336 continue; | 333 continue; |
337 | 334 |
338 sources.push_back(source); | 335 sources.push_back(source); |
339 } | 336 } |
340 } | 337 } |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 for (const auto& object : pair.second) { | 422 for (const auto& object : pair.second) { |
426 object->Print(out, 2); | 423 object->Print(out, 2); |
427 } | 424 } |
428 out << "/* End " << ToString(pair.first) << " section */\n"; | 425 out << "/* End " << ToString(pair.first) << " section */\n"; |
429 } | 426 } |
430 | 427 |
431 out << "\t};\n" | 428 out << "\t};\n" |
432 << "\trootObject = " << project->Reference() << ";\n" | 429 << "\trootObject = " << project->Reference() << ";\n" |
433 << "}\n"; | 430 << "}\n"; |
434 } | 431 } |
OLD | NEW |