aboutsummaryrefslogtreecommitdiff
path: root/build2/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-24 15:41:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-24 15:41:54 +0200
commit3a8972b42f75e10e9a833bba58d65009e7bed7f3 (patch)
treecb350e533b967b828ece6a59ced5bb2caa932de7 /build2/utility
parentfeb55ebfdc536c32de2c173d108df5ee0004da44 (diff)
Handle *.export.libs, distinguish interface and implementation dependencies
A library dependency on another libraries is either "interface" or "implementation". If it is interface, then everyone who links to this library should also link to the interface dependency, explicitly. A good example of an interface dependency is a library API that is called in inline functions. Interface dependencies of a library should be explicitly listed in the *.export.libs (where we can also list target names). So the typical usage will be along these lines: import int_libs = libfoo%lib{foo} import int_libs += ... import imp_libs = libbar%lib{bar} import imp_libs += ... lib{baz}: ... $int_libs $imp_libs lib{baz}: cxx.export.libs = $int_libs
Diffstat (limited to 'build2/utility')
-rw-r--r--build2/utility14
1 files changed, 14 insertions, 0 deletions
diff --git a/build2/utility b/build2/utility
index 3fb47b7..3ccca61 100644
--- a/build2/utility
+++ b/build2/utility
@@ -211,6 +211,14 @@ namespace build2
template <typename T>
void
+ append_options (strings&, T&, const variable&);
+
+ template <typename T>
+ void
+ append_options (strings&, T&, const char*);
+
+ template <typename T>
+ void
hash_options (sha256&, T&, const variable&);
template <typename T>
@@ -226,12 +234,18 @@ namespace build2
append_options (cstrings&, const lookup&);
void
+ append_options (strings&, const lookup&);
+
+ void
hash_options (sha256&, const lookup&);
void
append_options (cstrings&, const strings&);
void
+ append_options (strings&, const strings&);
+
+ void
hash_options (sha256&, const strings&);
// Check if a specified option is present in the variable or value. T is