Update GN docs about Visual Studio generators BUG= Review URL: https://codereview.chromium.org/1750523002 Cr-Original-Commit-Position: refs/heads/master@{#378419} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: eca97f87e275a7c9c5b7f13a65ff8635f0821d46
diff --git a/tools/gn/docs/faq.md b/tools/gn/docs/faq.md index cd32f6a..5a4bb07 100644 --- a/tools/gn/docs/faq.md +++ b/tools/gn/docs/faq.md
@@ -31,19 +31,11 @@ ## Will XCode/Visual Studio still be supported? -They're not supported now. +Visual Studio is supported. Visual Studio can be used as an IDE for code +browsing or debugging but Ninja is used for building. +Run `gn help gen` for more details. -Long-term, if your use-case is to use Ninja for building but Visual -Studio or XCode for debugging, there is desire to write a simple wrapper -around Ninja that lists the files in Visual Studio or XCode format, and -has a command to run ninja for when you press build. This setup should -provide the type of interactive debugging experience people want (the -iOS team currently uses a Ninja/XCode build like this with success). - -This project is not staffed. If you're interested, it probably isn't too -hard. It won't get done unless somebody volunteers. There is a [spec for -IDE -integration](https://docs.google.com/document/d/1kwREU99u8GpRammLbbKwrfaDI6WV7nsMAaoF5dcuhOU/edit?usp=sharing). +XCode is not supported yet. We need help! ## I'm weird. Will my uncommon build mode be supported?
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md index 9ed3b87..40da46b 100644 --- a/tools/gn/docs/reference.md +++ b/tools/gn/docs/reference.md
@@ -532,7 +532,7 @@ ## **gn gen**: Generate ninja files. ``` - gn gen [--ide=<ide_name>] <out_dir> + gn gen [<ide options>] <out_dir> Generates ninja files from the current tree and puts them in the given output directory. @@ -542,12 +542,47 @@ Or it can be a directory relative to the current directory such as: out/foo - --ide=<ide_name> - Also generate files for an IDE. Currently supported values: - 'vs' - Visual Studio project/solution files. - See "gn help switches" for the common command-line switches. +``` + +### **IDE options** + +``` + GN optionally generates files for IDE. Possibilities for <ide options> + + --ide=<ide_name> + Generate files for an IDE. Currently supported values: + "eclipse" - Eclipse CDT settings file. + "vs" - Visual Studio project/solution files. + (default Visual Studio version: 2015) + "vs2013" - Visual Studio 2013 project/solution files. + "vs2015" - Visual Studio 2015 project/solution files. + + --sln=<file_name> + Override default sln file name ("all"). Solution file is written + to the root build directory. Only for Visual Studio. + + --filters=<path_prefixes> + Semicolon-separated list of label patterns used to limit the set + of generated projects (see "gn help label_pattern"). Only + matching targets will be included to the solution. Only for Visual + Studio. + +``` + +### **Eclipse IDE Support** + +``` + GN DOES NOT generate Eclipse CDT projects. Instead, it generates a + settings file which can be imported into an Eclipse CDT project. The + XML file contains a list of include paths and defines. Because GN does + not generate a full .cproject definition, it is not possible to + properly define includes/defines for each file individually. + Instead, one set of includes/defines is generated for the entire + project. This works fairly well but may still result in a few indexer + issues here and there. + ``` ## **gn help <anything>**