| 1 |
project('version compare', meson_version: '>= 0.1') |
| 2 |
|
| 3 |
if meson.version().version_compare('>= 9999') |
| 4 |
error('This should not be executed') |
| 5 |
elif meson.version().version_compare('>= 0.55') and false |
| 6 |
error('This should not be executed') |
| 7 |
elif not meson.version().version_compare('>= 0.55') |
| 8 |
error('This should not be executed') |
| 9 |
elif meson.version().version_compare('>= 0.55') |
| 10 |
# This Should not produce warning even when using function not available in |
| 11 |
# meson 0.1. |
| 12 |
foo_dep = declare_dependency() |
| 13 |
meson.override_dependency('foo', foo_dep) |
| 14 |
endif |
| 15 |
|
| 16 |
# This will error out if elif cause did not enter |
| 17 |
assert(foo_dep.found(), 'meson.version_compare did not work') |
| 18 |
|
| 19 |
subproject('foo') |