summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2018-11-24 11:19:13 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2018-11-24 11:19:13 +0100
commitceb5e9f0420785799cbbc6167d224e89dcefb5ce (patch)
treecdc284c8bbb13cecf10d1afe61c3be7d22db27b9
parent1759fc8f459dc8d91675566c39b5dfee6fefe8dd (diff)
downloadmeson-ceb5e9f0420785799cbbc6167d224e89dcefb5ce.tar.gz
Updated docs [skip ci]
-rw-r--r--docs/markdown/IDE-integration.md36
-rw-r--r--docs/markdown/snippets/buildopts_section.md14
2 files changed, 50 insertions, 0 deletions
diff --git a/docs/markdown/IDE-integration.md b/docs/markdown/IDE-integration.md
index 2ce4b7868..5f0c0a66f 100644
--- a/docs/markdown/IDE-integration.md
+++ b/docs/markdown/IDE-integration.md
@@ -30,12 +30,48 @@ In order to make code completion work, you need the compiler flags for each comp
Note that if the target has dependencies (such as generated sources), then the commands for those show up in this list as well, so you need to do some filtering. Alternatively you can grab every command invocation in the [Clang tools db](https://clang.llvm.org/docs/JSONCompilationDatabase.html) format that is written to a file called `compile_commands.json` in the build directory.
+## Build Options
+
The next thing to display is the list of options that can be set. These include build type and so on. Here's how to extract them.
meson introspect --buildoptions
+This command returns a list of all supported buildoptions with the format:
+
+```json
+{
+ "name": "name of the option",
+ "description": "the description",
+ "type": "type ID",
+ "value": "value depends on type",
+ "section": "section ID"
+}
+```
+
+The supported types are:
+
+ - string
+ - boolean
+ - combo
+ - integer
+ - array
+
+For the type `combo` the key `choices` is also present. Here all valid values for the option are stored.
+
+The possible values for `section` are:
+
+ - core
+ - backend
+ - base
+ - compiler
+ - directory
+ - user
+ - test
+
To set the options, use the `meson configure` command.
+## Tests
+
Compilation and unit tests are done as usual by running the `ninja` and `ninja test` commands. A JSON formatted result log can be found in `workspace/project/builddir/meson-logs/testlog.json`.
When these tests fail, the user probably wants to run the failing test in a debugger. To make this as integrated as possible, extract the test test setups with this command.
diff --git a/docs/markdown/snippets/buildopts_section.md b/docs/markdown/snippets/buildopts_section.md
new file mode 100644
index 000000000..74cf8a1c9
--- /dev/null
+++ b/docs/markdown/snippets/buildopts_section.md
@@ -0,0 +1,14 @@
+## New `section` key for the buildoptions introspection
+
+Meson now has a new `section` key in each build option. This allows
+IDEs to group these options similar to `meson configure`.
+
+The possible values for `section` are:
+
+ - core
+ - backend
+ - base
+ - compiler
+ - directory
+ - user
+ - test