diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-02-18 15:03:21 -0800 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-02-19 07:07:35 +0530 |
commit | 73ddc014774102b378bb89bf9d4801d7b231b745 (patch) | |
tree | 1f478c6cb10c9ece2ec81d979be9b38e31c07223 /test cases/cmake | |
parent | 52d36aaec13966b68994764191c8881edc92291e (diff) | |
download | meson-73ddc014774102b378bb89bf9d4801d7b231b745.zip meson-73ddc014774102b378bb89bf9d4801d7b231b745.tar.gz meson-73ddc014774102b378bb89bf9d4801d7b231b745.tar.bz2 |
modules/cmake: Add a found() method to the cmake subproject
Just like the native meson subproject has.
Diffstat (limited to 'test cases/cmake')
-rw-r--r-- | test cases/cmake/1 basic/meson.build | 1 | ||||
-rw-r--r-- | test cases/cmake/9 disabled subproject/meson.build | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/test cases/cmake/1 basic/meson.build b/test cases/cmake/1 basic/meson.build index 8e1671a..19c87c4 100644 --- a/test cases/cmake/1 basic/meson.build +++ b/test cases/cmake/1 basic/meson.build @@ -5,6 +5,7 @@ cm = import('cmake') sub_pro = cm.subproject('cmMod') sub_dep = sub_pro.dependency('cmModLib++') +assert(sub_pro.found(), 'found() method reports not found, but should be found') assert(sub_pro.target_list() == ['cmModLib++'], 'There should be exactly one target') assert(sub_pro.target_type('cmModLib++') == 'shared_library', 'Target type should be shared_library') diff --git a/test cases/cmake/9 disabled subproject/meson.build b/test cases/cmake/9 disabled subproject/meson.build index ba38410..c153fa3 100644 --- a/test cases/cmake/9 disabled subproject/meson.build +++ b/test cases/cmake/9 disabled subproject/meson.build @@ -2,4 +2,5 @@ project('cmakeSubTest', ['c', 'cpp']) cm = import('cmake') -sub_pro = cm.subproject('nothinig', required: false)
\ No newline at end of file +sub_pro = cm.subproject('nothinig', required: false) +assert(not sub_pro.found(), 'subproject found() reports wrong value') |