aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-02-18 15:03:21 -0800
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-02-19 07:07:35 +0530
commit73ddc014774102b378bb89bf9d4801d7b231b745 (patch)
tree1f478c6cb10c9ece2ec81d979be9b38e31c07223 /test cases
parent52d36aaec13966b68994764191c8881edc92291e (diff)
downloadmeson-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')
-rw-r--r--test cases/cmake/1 basic/meson.build1
-rw-r--r--test cases/cmake/9 disabled subproject/meson.build3
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')