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

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: better help message, simplification in command_gen.cc 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..b5ffc1494807d159b139cb0289ce834dbe7ddc7d 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,15 +158,20 @@ 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 == kSwitchIdeValueVs || ide == kSwitchIdeValueVs2013 ||
+ ide == kSwitchIdeValueVs2015) {
+ VisualStudioWriter::Version version =
+ ide == kSwitchIdeValueVs2013 ? VisualStudioWriter::Version::Vs2013
+ : VisualStudioWriter::Version::Vs2015;
+ bool res = VisualStudioWriter::RunAndWriteFiles(build_settings, builder,
+ version, err);
if (res &&
!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kQuiet)) {
OutputString("Generating Visual Studio projects took " +
@@ -198,8 +205,11 @@ const char kGen_Help[] =
"\n"
" --ide=<ide_name>\n"
" Also generate files for an IDE. Currently supported values:\n"
- " 'vs' - Visual Studio project/solution files.\n"
- " 'eclipse' - Eclipse CDT settings file.\n"
+ " \"eclipse\" - Eclipse CDT settings file.\n"
+ " \"vs\" - Visual Studio project/solution files.\n"
+ " (default Visual Studio version: 2015)\n"
+ " \"vs2013\" - Visual Studio 2013 project/solution files.\n"
+ " \"vs2015\" - Visual Studio 2015 project/solution files.\n"
"\n"
" See \"gn help switches\" for the common command-line switches.\n"
"\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