Chromium Code Reviews| Index: tools/gn/command_gen.cc |
| diff --git a/tools/gn/command_gen.cc b/tools/gn/command_gen.cc |
| index 7ba77896006c397047ef9385c9b4f7524a12684e..2a413a05f9516d466677eff0ea3823b462f19233 100644 |
| --- a/tools/gn/command_gen.cc |
| +++ b/tools/gn/command_gen.cc |
| @@ -29,6 +29,8 @@ const char kSwitchCheck[] = "check"; |
| const char kSwitchIde[] = "ide"; |
| const char kSwitchIdeValueEclipse[] = "eclipse"; |
| const char kSwitchIdeValueVs[] = "vs"; |
| +const char kSwitchIdeValueVs2013[] = "vs2013"; |
| +const char kSwitchIdeValueVs2015[] = "vs2015"; |
| // Called on worker thread to write the ninja file. |
| void BackgroundDoWrite(const Target* target) { |
| @@ -156,18 +158,29 @@ bool RunIdeWriter(const std::string& ide, |
| base::ElapsedTimer timer; |
| if (ide == kSwitchIdeValueEclipse) { |
| bool res = EclipseWriter::RunAndWriteFile(build_settings, builder, err); |
| - if (res) { |
| + if (res && |
| + !base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kQuiet)) { |
| OutputString("Generating Eclipse settings took " + |
| base::Int64ToString(timer.Elapsed().InMilliseconds()) + |
| "ms\n"); |
| } |
| return res; |
| - } else if (ide == kSwitchIdeValueVs) { |
| - bool res = |
| - VisualStudioWriter::RunAndWriteFiles(build_settings, builder, err); |
| + } else if (ide == kSwitchIdeValueVs2013) { |
| + bool res = VisualStudioWriter::RunAndWriteFiles( |
| + build_settings, builder, VisualStudioWriter::Version::Vs2013, err); |
| if (res && |
| !base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kQuiet)) { |
| - OutputString("Generating Visual Studio projects took " + |
| + OutputString("Generating Visual Studio 2013 projects took " + |
| + base::Int64ToString(timer.Elapsed().InMilliseconds()) + |
| + "ms\n"); |
| + } |
| + return res; |
| + } else if (ide == kSwitchIdeValueVs || ide == kSwitchIdeValueVs2015) { |
|
Tomasz Moniuszko
2016/02/22 09:30:37
I think this block can be merged with the previous
NGG
2016/02/22 12:08:03
Done.
|
| + bool res = VisualStudioWriter::RunAndWriteFiles( |
| + build_settings, builder, VisualStudioWriter::Version::Vs2015, err); |
| + if (res && |
| + !base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kQuiet)) { |
| + OutputString("Generating Visual Studio 2015 projects took " + |
| base::Int64ToString(timer.Elapsed().InMilliseconds()) + |
| "ms\n"); |
| } |
| @@ -199,6 +212,8 @@ const char kGen_Help[] = |
| " --ide=<ide_name>\n" |
| " Also generate files for an IDE. Currently supported values:\n" |
| " 'vs' - Visual Studio project/solution files.\n" |
| + " 'vs2013' - Generate files for Visual Studio 2013.\n" |
| + " 'vs2015' - Generate files for Visual Studio 2015. (default)\n" |
|
Tomasz Moniuszko
2016/02/22 09:30:37
I think it's not clear what (default) means here.
NGG
2016/02/22 12:08:03
That's a too long line unfortunately, how about pa
|
| " 'eclipse' - Eclipse CDT settings file.\n" |
| "\n" |
| " See \"gn help switches\" for the common command-line switches.\n" |