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

Unified Diff: tools/gn/command_gen.cc

Issue 1883093002: Add support for generating the QtCreator projects from GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « tools/gn/BUILD.gn ('k') | tools/gn/gn.gyp » ('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 74a5d90cfd3495b0530a6e679796b53b62b431a1..f872304b6dc5f273de7b52b103a9226a325e5e4d 100644
--- a/tools/gn/command_gen.cc
+++ b/tools/gn/command_gen.cc
@@ -13,6 +13,7 @@
#include "tools/gn/eclipse_writer.h"
#include "tools/gn/ninja_target_writer.h"
#include "tools/gn/ninja_writer.h"
+#include "tools/gn/qt_creator_writer.h"
#include "tools/gn/runtime_deps.h"
#include "tools/gn/scheduler.h"
#include "tools/gn/setup.h"
@@ -30,6 +31,7 @@ const char kSwitchCheck[] = "check";
const char kSwitchFilters[] = "filters";
const char kSwitchIde[] = "ide";
const char kSwitchIdeValueEclipse[] = "eclipse";
+const char kSwitchIdeValueQtCreator[] = "qtcreator";
const char kSwitchIdeValueVs[] = "vs";
const char kSwitchIdeValueVs2013[] = "vs2013";
const char kSwitchIdeValueVs2015[] = "vs2015";
@@ -206,6 +208,18 @@ bool RunIdeWriter(const std::string& ide,
"ms\n");
}
return res;
+ } else if (ide == kSwitchIdeValueQtCreator) {
+ std::string root_target;
+ if (command_line->HasSwitch(kSwitchRootTarget))
+ root_target = command_line->GetSwitchValueASCII(kSwitchRootTarget);
+ bool res = QtCreatorWriter::RunAndWriteFile(build_settings, builder, err,
+ root_target);
+ if (res && !command_line->HasSwitch(switches::kQuiet)) {
+ OutputString("Generating QtCreator projects took " +
+ base::Int64ToString(timer.Elapsed().InMilliseconds()) +
+ "ms\n");
+ }
+ return res;
}
*err = Err(Location(), "Unknown IDE: " + ide);
@@ -244,6 +258,7 @@ const char kGen_Help[] =
" \"vs2013\" - Visual Studio 2013 project/solution files.\n"
" \"vs2015\" - Visual Studio 2015 project/solution files.\n"
" \"xcode\" - Xcode workspace/solution files.\n"
+ " \"qtcreator\" - QtCreator project files.\n"
"\n"
" --filters=<path_prefixes>\n"
" Semicolon-separated list of label patterns used to limit the set\n"
@@ -269,9 +284,17 @@ const char kGen_Help[] =
" using goma for example.\n"
"\n"
" --root-target=<target_name>\n"
- " Name of the target corresponding to \"All\" target in Xcode. If\n"
- " unset, \"All\" invokes ninja without any target thus build all the\n"
- " targets.\n"
+ " Name of the target corresponding to \"All\" target in Xcode.\n"
+ " If unset, \"All\" invokes ninja without any target\n"
+ " and builds everything.\n"
+ "\n"
+ "QtCreator Flags\n"
+ "\n"
+ " --root-target=<target_name>\n"
+ " Name of the root target for which the QtCreator project will be\n"
+ " generated to contain files of it and its dependencies. If unset, \n"
+ " the whole build graph will be omitted.\n"
Dirk Pranke 2016/05/13 15:24:42 the whole build graph will be omitted?
brucedawson 2016/05/13 16:39:02 My guess is that "emitted" was the word that was m
+ "\n"
"\n"
"Eclipse IDE Support\n"
"\n"
« no previous file with comments | « tools/gn/BUILD.gn ('k') | tools/gn/gn.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698