diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-02 17:11:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-02 17:11:50 +0200 |
commit | 9c4ce4464b2a0dae55b7cfb2ec5fc4bd7ffc40ae (patch) | |
tree | 8189944df3338ec138053b5f5fb3f5e966c8bda1 /build | |
parent | cf7f6e39c64ba5970fb6b43e92d5db839d0ac1e3 (diff) |
Override duplicate generated C++ dependency prefix
Diffstat (limited to 'build')
-rw-r--r-- | build/cxx/compile.cxx | 15 |
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 { |