aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-10-25 12:16:15 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-10-25 13:32:46 +0300
commit1c08fae61a1e9a01d56735768ad7f8f3d0b45f41 (patch)
treeb14805acb9d0261d9a067bcef7b25198c13394d2 /libbuild2/cc
parentcd6708644ed294a0d479dbe04caa7f0f570b80bb (diff)
Adapt to butl::semantic_version API change
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/guess.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/libbuild2/cc/guess.cxx b/libbuild2/cc/guess.cxx
index 3cf1d63..23c0b70 100644
--- a/libbuild2/cc/guess.cxx
+++ b/libbuild2/cc/guess.cxx
@@ -1066,7 +1066,7 @@ namespace build2
// The gcc -v output will have a last line in the form:
//
- // "gcc version X.Y[.Z][...] ..."
+ // "gcc version X[.Y[.Z]][...] ..."
//
// The "version" word can probably be translated. For example:
//
@@ -1078,6 +1078,7 @@ namespace build2
// gcc version 5.1.0 (Ubuntu 5.1.0-0ubuntu11~14.04.1)
// gcc version 6.0.0 20160131 (experimental) (GCC)
// gcc version 9.3-win32 20200320 (GCC)
+ // gcc version 10-win32 20220324 (GCC)
//
if (cache.empty ())
{
@@ -1923,7 +1924,7 @@ namespace build2
// though language words can be translated and even rearranged (see
// examples above).
//
- // "gcc version X.Y[.Z][...]"
+ // "gcc version X[.Y[.Z]][...]"
//
compiler_version ver;
{
@@ -1962,7 +1963,10 @@ namespace build2
//
try
{
- semantic_version v (string (s, b, e - b), ".-+");
+ semantic_version v (string (s, b, e - b),
+ semantic_version::allow_omit_minor |
+ semantic_version::allow_build,
+ ".-+");
ver.major = v.major;
ver.minor = v.minor;
ver.patch = v.patch;