aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/utility.cxx
blob: 0a26aea9fc9bd3976d82afd8174bf73d094ebe22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// file      : build2/cxx/utility.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2016 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);
    }
  }
}