summaryrefslogtreecommitdiffstats
path: root/build2/version/rule.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/version/rule.cxx')
-rw-r--r--build2/version/rule.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx
index b7b0b842..1ff5b41a 100644
--- a/build2/version/rule.cxx
+++ b/build2/version/rule.cxx
@@ -135,8 +135,6 @@ namespace build2
// of the MT-safety.
//
standard_version_constraint c;
-
- try
{
auto i (m.dependencies.find (pn));
@@ -146,12 +144,15 @@ namespace build2
if (i->second.empty ())
fail (l) << "no version constraint for dependency " << pn;
- c = standard_version_constraint (i->second);
- }
- catch (const invalid_argument& e)
- {
- fail (l) << "invalid version constraint for dependency " << pn
- << ": " << e;
+ try
+ {
+ c = standard_version_constraint (i->second, m.version);
+ }
+ catch (const invalid_argument& e)
+ {
+ fail (l) << "invalid version constraint for dependency " << pn
+ << " " << i->second << ": " << e;
+ }
}
// Now substitute.