diff options
Diffstat (limited to 'build2/version/rule.cxx')
-rw-r--r-- | build2/version/rule.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/build2/version/rule.cxx b/build2/version/rule.cxx index b7b0b84..1ff5b41 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. |