aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/utility.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cxx/utility.cxx')
-rw-r--r--build2/cxx/utility.cxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/build2/cxx/utility.cxx b/build2/cxx/utility.cxx
new file mode 100644
index 0000000..fead1b4
--- /dev/null
+++ b/build2/cxx/utility.cxx
@@ -0,0 +1,29 @@
+// file : build2/cxx/utility.cxx -*- C++ -*-
+// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#include <build2/cxx/utility>
+
+#include <build2/bin/target>
+
+using namespace std;
+
+namespace build2
+{
+ 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);
+ }
+ }
+}