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

Unified Diff: tools/gn/command_gen.cc

Issue 1713363002: GN support for generating VS2013 project files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/visual_studio_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
« no previous file with comments | « no previous file | tools/gn/visual_studio_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698