aboutsummaryrefslogtreecommitdiff
path: root/build/cxx/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-20 10:38:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-20 10:38:02 +0200
commitc1981e367aafc22389ac0ab506b00e9657c8071c (patch)
tree528b0d00283411de2daf6d0e2163f72f2e741ee9 /build/cxx/utility.cxx
parent243da3993c138d33063f633aa3996a8a710ea396 (diff)
Implement support for importing installed libraries
Diffstat (limited to 'build/cxx/utility.cxx')
-rw-r--r--build/cxx/utility.cxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/build/cxx/utility.cxx b/build/cxx/utility.cxx
new file mode 100644
index 0000000..830ee76
--- /dev/null
+++ b/build/cxx/utility.cxx
@@ -0,0 +1,29 @@
+// file : build/cxx/utility.cxx -*- C++ -*-
+// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#include <build/cxx/utility>
+
+#include <build/bin/target>
+
+using namespace std;
+
+namespace build
+{
+ namespace cxx
+ {
+ void
+ append_lib_options (cstrings& args, target& l, const char* var)
+ {
+ using namespace bin;
+
+ for (target* t: l.prerequisite_targets)
+ {
+ if (t->is_a<lib> () || t->is_a<liba> () || t->is_a<libso> ())
+ append_lib_options (args, *t, var);
+ }
+
+ append_options (args, l, var);
+ }
+ }
+}