aboutsummaryrefslogtreecommitdiff
path: root/build2/cli
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cli')
-rw-r--r--build2/cli/rule.cxx10
-rw-r--r--build2/cli/target.cxx14
2 files changed, 14 insertions, 10 deletions
diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx
index ece5424..65e940b 100644
--- a/build2/cli/rule.cxx
+++ b/build2/cli/rule.cxx
@@ -87,15 +87,15 @@ namespace build2
//
if (t.h == nullptr)
{
- t.h = &search<cxx::hxx> (t.dir, t.name, nullptr, nullptr);
+ t.h = &search<cxx::hxx> (t.dir, t.out, t.name, nullptr, nullptr);
t.h->group = &t;
- t.c = &search<cxx::cxx> (t.dir, t.name, nullptr, nullptr);
+ t.c = &search<cxx::cxx> (t.dir, t.out, t.name, nullptr, nullptr);
t.c->group = &t;
if (!find_option ("--suppress-inline", t, "cli.options"))
{
- t.i = &search<cxx::ixx> (t.dir, t.name, nullptr, nullptr);
+ t.i = &search<cxx::ixx> (t.dir, t.out, t.name, nullptr, nullptr);
t.i->group = &t;
}
}
@@ -116,7 +116,7 @@ namespace build2
// Then check if there is a corresponding cli.cxx{} group.
//
- cli_cxx* g (targets.find<cli_cxx> (t.dir, t.name));
+ cli_cxx* g (targets.find<cli_cxx> (t.dir, t.out, t.name));
// If not or if it has no prerequisites (happens when we use it to
// set cli.options) and this target has a cli{} prerequisite, then
@@ -133,7 +133,7 @@ namespace build2
if (match_stem (t.name, p.name ()))
{
if (g == nullptr)
- g = &targets.insert<cli_cxx> (t.dir, t.name, trace);
+ g = &targets.insert<cli_cxx> (t.dir, t.out, t.name, trace);
g->prerequisites.emplace_back (p.as_prerequisite (trace));
}
diff --git a/build2/cli/target.cxx b/build2/cli/target.cxx
index 44d1a9a..52ddd17 100644
--- a/build2/cli/target.cxx
+++ b/build2/cli/target.cxx
@@ -49,7 +49,11 @@ namespace build2
}
static target*
- cli_cxx_factory (const target_type&, dir_path d, string n, const string* e)
+ cli_cxx_factory (const target_type&,
+ dir_path d,
+ dir_path o,
+ string n,
+ const string* e)
{
tracer trace ("cli::cli_cxx_factory");
@@ -58,11 +62,11 @@ namespace build2
// src_base if the buildfile mentions some of them explicitly
// as prerequisites.
//
- targets.insert<cxx::hxx> (d, n, trace);
- targets.insert<cxx::cxx> (d, n, trace);
- targets.insert<cxx::ixx> (d, n, trace);
+ targets.insert<cxx::hxx> (d, o, n, trace);
+ targets.insert<cxx::cxx> (d, o, n, trace);
+ targets.insert<cxx::ixx> (d, o, n, trace);
- return new cli_cxx (move (d), move (n), e);
+ return new cli_cxx (move (d), move (o), move (n), e);
}
const target_type cli_cxx::static_type