From 8b55e8151bd69e4ef11a67aff57618193f559618 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 7 Dec 2015 12:16:29 +0200 Subject: Add support for specifying minimum required build2 version The syntax is: using build@0.1.0-a1 The idea is that we will later also use it for modules and 'build' is a special, the "build system itself" module. Also fix a problem with peeking and lexer mode switching. --- build/utility | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'build/utility') diff --git a/build/utility b/build/utility index 404b33a..6769f95 100644 --- a/build/utility +++ b/build/utility @@ -7,7 +7,7 @@ #include #include -#include // move() +#include // move(), make_pair() #include // assert() #include #include @@ -17,6 +17,7 @@ namespace build { using std::move; + using std::make_pair; // Empty string and path. // @@ -24,6 +25,13 @@ namespace build extern const path empty_path; extern const dir_path empty_dir_path; + // Parse version string in the X.Y.Z[-{a|b}N] to a version integer in the + // AABBCCDD form as describe in . Throw invalid_argument + // if the passed string is not a valid version. + // + unsigned int + to_version (const string&); + // Call a function if there is an exception. // -- cgit v1.1