diff options
author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-05-21 12:36:01 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-05-23 15:14:08 +0300 |
commit | 736b099862f61b115b3845309b860cb66915fe2a (patch) | |
tree | 41dd86b1a58178349c305245e53950754efda2c7 /meson_options.txt | |
parent | 29cb27e662948b1d0710e9fdaceb5bb221746ff8 (diff) |
meson: Start using 'feature' options
Meson 0.47 comes with a new type of option called 'feature' so instead of:
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false'],
We can:
type : 'feature',
The main difference is that the feature takes auto, enabled and disabled
instead of auto, true and false.
get_option() on a feature returns opaque object that can be passed as
a 'required' argument of a dependency. Auto is equivalent to 'required
: false', enabled is equivalent to 'required : true' and disabled
introduces new behavior forcing the dependency to be considered not
found.
This allows us to streamline a lot of logic regarding optional IGT
features.
This patch bumps required meson version to 0.47.0
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Simon Ser <simon.ser@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'meson_options.txt')
-rw-r--r-- | meson_options.txt | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/meson_options.txt b/meson_options.txt index 888efe56..9cca0c4f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,5 @@ option('build_overlay', - type : 'combo', - value : 'auto', - choices : ['auto', 'true', 'false'], + type : 'feature', description : 'Build overlay') option('overlay_backends', @@ -11,33 +9,23 @@ option('overlay_backends', description : 'Overlay backends to enable') option('build_chamelium', - type : 'combo', - value : 'auto', - choices : ['auto', 'true', 'false'], + type : 'feature', description : 'Build chamelium test') option('with_valgrind', - type : 'combo', - value : 'auto', - choices : ['auto', 'true', 'false'], + type : 'feature', description : 'Build with support for valgrind annotations') option('build_man', - type : 'combo', - value : 'auto', - choices : ['auto', 'true', 'false'], + type : 'feature', description : 'Build man pages') option('build_docs', - type : 'combo', - value : 'auto', - choices : ['auto', 'true', 'false'], + type : 'feature', description : 'Build documentation') option('build_tests', - type : 'combo', - value : 'auto', - choices : ['auto', 'true', 'false'], + type : 'feature', description : 'Build tests') option('with_libdrm', @@ -47,15 +35,11 @@ option('with_libdrm', description : 'libdrm libraries to be used') option('with_libunwind', - type : 'combo', - value : 'auto', - choices : ['auto', 'true', 'false'], + type : 'feature', description : 'Use libunwind') option('build_runner', - type : 'combo', - value : 'auto', - choices : ['auto', 'true', 'false'], + type : 'feature', description : 'Build test runner') option('use_rpath', |