diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-07-03 14:00:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 14:00:47 +0300 |
commit | ec5baa62c8d8c578630a0962bbeea49bedd16a24 (patch) | |
tree | 05dffb3b12b45ab500f0c3ea6e40edef4cce1db1 /test cases/common | |
parent | f21685a83330a4bbe1e59c3641a0d24f1efe8825 (diff) | |
parent | bc4201a7f1e93d6afb62caa8ce81bb1b0211b70c (diff) | |
download | meson-ec5baa62c8d8c578630a0962bbeea49bedd16a24.zip meson-ec5baa62c8d8c578630a0962bbeea49bedd16a24.tar.gz meson-ec5baa62c8d8c578630a0962bbeea49bedd16a24.tar.bz2 |
Merge pull request #8950 from dcbaker/submit/import-required-disabled
Add required and disabled to import, modules.found method
Diffstat (limited to 'test cases/common')
-rw-r--r-- | test cases/common/67 modules/meson.build | 10 | ||||
-rw-r--r-- | test cases/common/67 modules/meson_options.txt | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test cases/common/67 modules/meson.build b/test cases/common/67 modules/meson.build index e9750cd..ad33ed6 100644 --- a/test cases/common/67 modules/meson.build +++ b/test cases/common/67 modules/meson.build @@ -2,3 +2,13 @@ project('module test', 'c') modtest = import('modtest') modtest.print_hello() +assert(modtest.found()) + +modtest = import('modtest', required : get_option('disabled')) +assert(not modtest.found()) + +notfound = import('not-found', required : false) +assert(not notfound.found()) + +disabled = import('not-found', required : false, disabler : true) +assert(is_disabler(disabled)) diff --git a/test cases/common/67 modules/meson_options.txt b/test cases/common/67 modules/meson_options.txt new file mode 100644 index 0000000..0671144 --- /dev/null +++ b/test cases/common/67 modules/meson_options.txt @@ -0,0 +1,6 @@ +option( + 'disabled', + type : 'feature', + value : 'disabled', + description : 'test disabled' +) |