diff options
Diffstat (limited to 'bpkg/package.ixx')
-rw-r--r-- | bpkg/package.ixx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bpkg/package.ixx b/bpkg/package.ixx index a870eb8..9c85407 100644 --- a/bpkg/package.ixx +++ b/bpkg/package.ixx @@ -11,4 +11,23 @@ namespace bpkg version (v) { } + + template <typename T> + inline bool + has_buildfile_clause (const vector<T>& ds) + { + for (const dependency_alternatives& das: ds) + { + for (const dependency_alternative& da: das) + { + // Note: the accept clause cannot be present if the prefer clause is + // absent. + // + if (da.enable || da.reflect || da.prefer || da.require) + return true; + } + } + + return false; + } } |