aboutsummaryrefslogtreecommitdiff
path: root/build/cxx/compile.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-02 17:11:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-02 17:11:50 +0200
commit9c4ce4464b2a0dae55b7cfb2ec5fc4bd7ffc40ae (patch)
tree8189944df3338ec138053b5f5fb3f5e966c8bda1 /build/cxx/compile.cxx
parentcf7f6e39c64ba5970fb6b43e92d5db839d0ac1e3 (diff)
Override duplicate generated C++ dependency prefix
Diffstat (limited to 'build/cxx/compile.cxx')
-rw-r--r--build/cxx/compile.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/build/cxx/compile.cxx b/build/cxx/compile.cxx
index f9351f2..9a3e3d7 100644
--- a/build/cxx/compile.cxx
+++ b/build/cxx/compile.cxx
@@ -263,9 +263,18 @@ namespace build
if (j != m.end ())
{
if (j->second != d)
- fail << "duplicate generated dependency prefix '" << p << "'" <<
- info << "old mapping to " << j->second <<
- info << "new mapping to " << d;
+ {
+ // We used to reject duplicates but it seems this can
+ // be reasonably expected to work according to the order
+ // of the -I options.
+ //
+ if (verb >= 3)
+ trace << "overriding dependency prefix '" << p << "'\n"
+ << " old mapping to " << j->second << "\n"
+ << " new mapping to " << d;
+
+ j->second = d;
+ }
}
else
{