aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/compile-rule.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-23 10:22:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-23 10:22:48 +0200
commitb7f4e6154fa3c07ad3472bbd7c871df28d440a64 (patch)
tree124a07cd2050c573eb7b12821db5904264b86957 /libbuild2/cc/compile-rule.hxx
parent6a2d1e3062964fc16cfbc43bc69284f854c35dca (diff)
Suppress duplicates when extracting library options (GitHub issue #114)
Diffstat (limited to 'libbuild2/cc/compile-rule.hxx')
-rw-r--r--libbuild2/cc/compile-rule.hxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/libbuild2/cc/compile-rule.hxx b/libbuild2/cc/compile-rule.hxx
index cbbb142..e52fed9 100644
--- a/libbuild2/cc/compile-rule.hxx
+++ b/libbuild2/cc/compile-rule.hxx
@@ -54,10 +54,12 @@ namespace build2
perform_clean (action, const target&) const;
public:
+ using appended_libraries = small_vector<const file*, 256>;
+
void
- append_lib_options (strings&,
- const scope&,
- action, const file&, bool, linfo) const;
+ append_library_options (appended_libraries&, strings&,
+ const scope&,
+ action, const file&, bool, linfo) const;
protected:
static void
functions (function_family&, const char*); // functions.cxx
@@ -72,15 +74,15 @@ namespace build2
template <typename T>
void
- append_lib_options (T&,
- const scope&,
- action, const file&, bool, linfo) const;
+ append_library_options (appended_libraries&, T&,
+ const scope&,
+ action, const file&, bool, linfo) const;
template <typename T>
void
- append_lib_options (T&,
- const scope&,
- action, const target&, linfo) const;
+ append_library_options (T&,
+ const scope&,
+ action, const target&, linfo) const;
// Mapping of include prefixes (e.g., foo in <foo/bar>) for auto-
// generated headers to directories where they will be generated.
@@ -107,9 +109,9 @@ namespace build2
append_prefixes (prefix_map&, const target&, const variable&) const;
void
- append_lib_prefixes (prefix_map&,
- const scope&,
- action, target&, linfo) const;
+ append_library_prefixes (prefix_map&,
+ const scope&,
+ action, target&, linfo) const;
prefix_map
build_prefix_map (const scope&, action, target&, linfo) const;