summaryrefslogtreecommitdiffstats
path: root/waftools/checks/generic.py
diff options
context:
space:
mode:
Diffstat (limited to 'waftools/checks/generic.py')
-rw-r--r--waftools/checks/generic.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/waftools/checks/generic.py b/waftools/checks/generic.py
index cecbeabdd1..4e27f5114a 100644
--- a/waftools/checks/generic.py
+++ b/waftools/checks/generic.py
@@ -7,7 +7,7 @@ from waflib import Utils
__all__ = [
"check_pkg_config", "check_pkg_config_mixed", "check_pkg_config_mixed_all",
"check_pkg_config_cflags", "check_cc", "check_statement", "check_libs",
- "check_headers", "compose_checks", "check_true", "any_version",
+ "check_headers", "compose_checks", "any_check", "check_true", "any_version",
"load_fragment", "check_stub", "check_ctx_vars", "check_program",
"check_pkg_config_datadir", "check_macos_sdk"]
@@ -180,6 +180,11 @@ def compose_checks(*checks):
return all([check(ctx, dependency_identifier) for check in checks])
return fn
+def any_check(*checks):
+ def fn(ctx, dependency_identifier):
+ return any(check(ctx, dependency_identifier) for check in checks)
+ return fn
+
def load_fragment(fragment):
file_path = os.path.join(os.path.dirname(__file__), '..', 'fragments',
fragment)