From 727531fc3d097413cfc9e972a83abadebed3f35d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 14 Jun 2022 05:43:17 +0200 Subject: Pass both depends and alternative indexes to evaluate_*() functions --- bpkg/package-skeleton.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'bpkg/package-skeleton.cxx') diff --git a/bpkg/package-skeleton.cxx b/bpkg/package-skeleton.cxx index fb76f67..3156fff 100644 --- a/bpkg/package-skeleton.cxx +++ b/bpkg/package-skeleton.cxx @@ -571,8 +571,10 @@ namespace bpkg } bool package_skeleton:: - evaluate_enable (const string& cond, size_t depends_index) + evaluate_enable (const string& cond, pair indexes) { + size_t depends_index (indexes.first); + try { using namespace build2; @@ -630,8 +632,10 @@ namespace bpkg } void package_skeleton:: - evaluate_reflect (const string& refl, size_t depends_index) + evaluate_reflect (const string& refl, pair indexes) { + size_t depends_index (indexes.first); + // The reflect configuration variables are essentially overrides that will // be passed on the command line when we configure the package. They could // clash with configuration variables specified by the user (config_vars_) @@ -955,8 +959,10 @@ namespace bpkg evaluate_prefer_accept (const dependency_configurations& cfgs, const string& prefer, const string& accept, - size_t depends_index) + pair indexes) { + size_t depends_index (indexes.first); + assert (dependency_reflect_index_ <= depends_index); try @@ -1219,8 +1225,10 @@ namespace bpkg bool package_skeleton:: evaluate_require (const dependency_configurations& cfgs, - const string& require, size_t depends_index) + const string& require, pair indexes) { + size_t depends_index (indexes.first); + assert (dependency_reflect_index_ <= depends_index); try -- cgit v1.1