aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-02-12 15:17:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-02-12 15:17:37 +0200
commitf11213933bc79c8115974f5f7971b97413481654 (patch)
tree1123d942b430a5b92c34c84c3645bbb2ccc6e4ba
parent00673d008635a73d262efaceb86f7af58bbaf8d7 (diff)
Normalize directory when building include prefix map
-rw-r--r--build2/cc/compile-rule.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/build2/cc/compile-rule.cxx b/build2/cc/compile-rule.cxx
index b5b7cfe..dd95314 100644
--- a/build2/cc/compile-rule.cxx
+++ b/build2/cc/compile-rule.cxx
@@ -1143,6 +1143,12 @@ namespace build2
<< " in variable " << var.name
<< " for target " << t;
+ // If the directory is not normalized, we can complain or normalize
+ // it. Let's go with normalizing to minimize questions/complaints.
+ //
+ if (!d.normalized (false)) // Allow non-canonical dir separators.
+ d.normalize ();
+
// If we are not inside our project root, then ignore.
//
if (!d.sub (out_root))