diff options
author | Daniel Schulte <trilader@schroedingers-bit.net> | 2018-09-16 17:42:57 +0200 |
---|---|---|
committer | Daniel Schulte <trilader@schroedingers-bit.net> | 2018-11-26 23:12:00 +0100 |
commit | 0e621937306575b9c1a2f5b07e6dd8d9e6c27ee7 (patch) | |
tree | be82e3b81b18205edc18b0f71d9683c88920ed9a /docs/markdown/snippets | |
parent | 8c9c5199f9c2c08190e424ffcaed6d54b8c47184 (diff) | |
download | meson-0e621937306575b9c1a2f5b07e6dd8d9e6c27ee7.zip meson-0e621937306575b9c1a2f5b07e6dd8d9e6c27ee7.tar.gz meson-0e621937306575b9c1a2f5b07e6dd8d9e6c27ee7.tar.bz2 |
mintro: Allow introspect --projectinfo without build directory.
This variant was added to allow introspection before configuring a build
directory. This is useful for IDE integration to allow displaying and/or
setting options for the initial configuration of the build directory.
It also allows showing basic information about the project even if it's
not yet configured or configuring failed.
The project 'name' field in --projectinfo is used inconsistently:
For the top level project it always shows the name configured in
the top level meson.build file. For subprojects it's referring to the
name of the directory the subproject's meson.build is contained in.
To have a consistent output and preserve the existing behavior this adds
the 'descriptive_name' field which always shows the name set in the
project.
To be consistent the 'descriptive_name' field was also added to the
--projectfiles variant that uses an already configured build.
It also extends the information shown with the list of buildsystem-files.
This is currently only implemented in the variant for unconfigured
projects.
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/introspect_projectinfo.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/markdown/snippets/introspect_projectinfo.md b/docs/markdown/snippets/introspect_projectinfo.md new file mode 100644 index 0000000..40558b8 --- /dev/null +++ b/docs/markdown/snippets/introspect_projectinfo.md @@ -0,0 +1,35 @@ +## `introspect --projectinfo` can now be used without configured build directory + +This allows IDE integration to get information about the project before the user has configured a build directory. + +Before you could use `meson.py introspect --projectinfo build-directory`. +Now you also can use `meson.py introspect --projectinfo project-dir/meson.build`. + +The output is similiar to the output with a build directory but additionally also includes information from `introspect --buildsystem-files`. + +For example `meson.py introspect --projectinfo test\ cases/common/47\ subproject\ options/meson.build` +This outputs (pretty printed for readability): +``` +{ + "buildsystem_files": [ + "meson_options.txt", + "meson.build" + ], + "name": "suboptions", + "version": null, + "descriptive_name": "suboptions", + "subprojects": [ + { + "buildsystem_files": [ + "subprojects/subproject/meson_options.txt", + "subprojects/subproject/meson.build" + ], + "name": "subproject", + "version": "undefined", + "descriptive_name": "subproject" + } + ] +} +``` + +Both usages now include a new `descriptive_name` property which always shows the name set in the project. |