aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-06-02 02:44:59 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-05 15:57:57 +0000
commitc3ffc1a2497e41b232d4e3d4da220381cb3c0371 (patch)
treef6fdfbc8eb1fe97a3261a909c82640d3b7cfec16
parent9b314c9c24b52ecdda81510ad7a7f0e3914895d0 (diff)
downloadmeson-c3ffc1a2497e41b232d4e3d4da220381cb3c0371.zip
meson-c3ffc1a2497e41b232d4e3d4da220381cb3c0371.tar.gz
meson-c3ffc1a2497e41b232d4e3d4da220381cb3c0371.tar.bz2
docs: Add a release notes snippet about FeatureNew
-rw-r--r--docs/markdown/snippets/feature_new.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/markdown/snippets/feature_new.md b/docs/markdown/snippets/feature_new.md
new file mode 100644
index 0000000..7480634
--- /dev/null
+++ b/docs/markdown/snippets/feature_new.md
@@ -0,0 +1,32 @@
+## Feature detection based on meson_version in project()
+
+Meson will now print a `WARNING:` message during configuration if you use
+a function or a keyword argument that was added in a meson version that's newer
+than the version specified inside `project()`. For example:
+
+```meson
+project('featurenew', meson_version: '>=0.43')
+
+cdata = configuration_data()
+cdata.set('FOO', 'bar')
+message(cdata.get_unquoted('FOO'))
+```
+
+This will output:
+
+```
+The Meson build system
+Version: 0.47.0.dev1
+Source dir: C:\path\to\srctree
+Build dir: C:\path\to\buildtree
+Build type: native build
+Project name: featurenew
+Project version: undefined
+Build machine cpu family: x86_64
+Build machine cpu: x86_64
+WARNING: Project targetting '>=0.43' but tried to use feature introduced in '0.44.0': get_unquoted
+Message: bar
+Build targets in project: 0
+Minimum version of features used:
+0.44.0: {'get_unquoted'}
+```