Index: tools/gn/command_gen.cc |
diff --git a/tools/gn/command_gen.cc b/tools/gn/command_gen.cc |
index 74a5d90cfd3495b0530a6e679796b53b62b431a1..670a0c65ea49820c4db513ea3b9d77a74b8b9193 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,9 @@ 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" |
Dirk Pranke
2016/05/13 01:50:23
You didn't create a separate "QtCreator Flags" sec
Krzysztof Olczyk
2016/05/13 10:32:14
Yes, I totally agree. I apologize - somehow, I hav
|
+ " or QtCreator. If unset, \"All\" invokes ninja without any target\n" |
+ " and builds everything.\n" |
"\n" |
"Eclipse IDE Support\n" |
"\n" |