From f11213933bc79c8115974f5f7971b97413481654 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 12 Feb 2019 15:17:37 +0200 Subject: Normalize directory when building include prefix map --- build2/cc/compile-rule.cxx | 6 ++++++ 1 file changed, 6 insertions(+) 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)) -- cgit v1.1