| Index: tools/gn/command_gen.cc
|
| diff --git a/tools/gn/command_gen.cc b/tools/gn/command_gen.cc
|
| index fee3f1a31f836c7843eac42afdeb918722c43413..474e2453588fb66d06a7f382ac571a7e7e54f84a 100644
|
| --- a/tools/gn/command_gen.cc
|
| +++ b/tools/gn/command_gen.cc
|
| @@ -20,6 +20,7 @@
|
| #include "tools/gn/switches.h"
|
| #include "tools/gn/target.h"
|
| #include "tools/gn/visual_studio_writer.h"
|
| +#include "tools/gn/xcode_writer.h"
|
|
|
| namespace commands {
|
|
|
| @@ -32,7 +33,12 @@ const char kSwitchIdeValueEclipse[] = "eclipse";
|
| const char kSwitchIdeValueVs[] = "vs";
|
| const char kSwitchIdeValueVs2013[] = "vs2013";
|
| const char kSwitchIdeValueVs2015[] = "vs2015";
|
| +const char kSwitchIdeValueXcode[] = "xcode";
|
| +const char kSwitchNinjaExtraArgs[] = "ninja-extra-args";
|
| +const char kSwitchPattern[] = "pattern";
|
| +const char kSwitchRootTarget[] = "root-target";
|
| const char kSwitchSln[] = "sln";
|
| +const char kSwitchWorkspace[] = "workspace";
|
|
|
| // Called on worker thread to write the ninja file.
|
| void BackgroundDoWrite(const Target* target) {
|
| @@ -188,6 +194,19 @@ bool RunIdeWriter(const std::string& ide,
|
| "ms\n");
|
| }
|
| return res;
|
| + } else if (ide == kSwitchIdeValueXcode) {
|
| + bool res = XcodeWriter::RunAndWriteFiles(
|
| + command_line->GetSwitchValueNative(kSwitchWorkspace),
|
| + command_line->GetSwitchValueNative(kSwitchRootTarget),
|
| + command_line->GetSwitchValueNative(kSwitchNinjaExtraArgs),
|
| + command_line->GetSwitchValueNative(kSwitchPattern), build_settings,
|
| + builder, err);
|
| + if (res && !command_line->HasSwitch(switches::kQuiet)) {
|
| + OutputString("Generating Xcode projects took " +
|
| + base::Int64ToString(timer.Elapsed().InMilliseconds()) +
|
| + "ms\n");
|
| + }
|
| + return res;
|
| }
|
|
|
| *err = Err(Location(), "Unknown IDE: " + ide);
|
|
|