From 4184f61e2b795dd4c4b4a974a890bdaf98906b82 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Nov 2017 13:08:03 +0200 Subject: Enter outer prefixes in generated header prefix map --- build2/cc/compile.hxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'build2/cc/compile.hxx') diff --git a/build2/cc/compile.hxx b/build2/cc/compile.hxx index 9d85763..2878e3d 100644 --- a/build2/cc/compile.hxx +++ b/build2/cc/compile.hxx @@ -78,9 +78,18 @@ namespace build2 // we continue with the example). Specifically, we need to make sure we // don't treat foobar as a sub-directory of foo. // + // The priority is used to decide who should override whom. Lesser + // values are considered higher priority. See append_prefixes() for + // details. + // // @@ The keys should be normalized. // - using prefix_map = butl::dir_path_map; + struct prefix_value + { + dir_path directory; + size_t priority; + }; + using prefix_map = butl::dir_path_map; void append_prefixes (prefix_map&, const target&, const variable&) const; -- cgit v1.1