aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-05 11:47:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-05 11:47:59 +0200
commit3585bd0ea3e7a32f8dc3e634b4358d822d9ee018 (patch)
treedac01a7ff58eb132c0a80505c96a1039c2648945
parentdf56d347a75151c7bd6a4d3837f62777cc0354ca (diff)
Distinguish between MSVC command line errors and warnings
-rw-r--r--build2/cc/compile-rule.cxx5
-rw-r--r--build2/cc/msvc.cxx2
2 files changed, 5 insertions, 2 deletions
diff --git a/build2/cc/compile-rule.cxx b/build2/cc/compile-rule.cxx
index 437255e..0ce593e 100644
--- a/build2/cc/compile-rule.cxx
+++ b/build2/cc/compile-rule.cxx
@@ -2585,7 +2585,10 @@ namespace build2
//
if (l != src.path ().leaf ().string ())
{
- if (msvc_sense_diag (l, 'D') != string::npos)
+ // D8XXX are errors while D9XXX are warnings.
+ //
+ size_t p (msvc_sense_diag (l, 'D'));
+ if (p != string::npos && l[p] == '9')
continue;
text << l;
diff --git a/build2/cc/msvc.cxx b/build2/cc/msvc.cxx
index 4f63abf..0d3650e 100644
--- a/build2/cc/msvc.cxx
+++ b/build2/cc/msvc.cxx
@@ -140,7 +140,7 @@ namespace build2
{
// While it appears VC always prints the source name (event if the
// file does not exist), let's do a sanity check. Also handle the
- // command line warnings which come before the file name.
+ // command line errors/warnings which come before the file name.
//
for (string l; !eof (getline (is, l)); )
{