aboutsummaryrefslogtreecommitdiff
path: root/build/cli/rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-01 17:37:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-01 17:37:23 +0200
commit455ad2bf70eb0a6e29c8c7179e1c40c18bd8ee2f (patch)
tree98de78e1abf2180d7bc5c18ddf589d8edc30af41 /build/cli/rule.cxx
parente4c4fec8c9097722ee5ee94f2ce5ad0313ed8d7b (diff)
Get rid of accessors/modifiers in cli.cxx target
Diffstat (limited to 'build/cli/rule.cxx')
-rw-r--r--build/cli/rule.cxx43
1 files changed, 20 insertions, 23 deletions
diff --git a/build/cli/rule.cxx b/build/cli/rule.cxx
index 3bcd074..c0c8fe0 100644
--- a/build/cli/rule.cxx
+++ b/build/cli/rule.cxx
@@ -58,15 +58,13 @@ namespace build
// cli.options are possible and we can determine whether the
// --suppress-inline option is present.
//
- if (t.h () == nullptr)
+ if (t.h == nullptr)
{
- cxx::hxx& h (search<cxx::hxx> (t.dir, t.name, nullptr, nullptr));
- h.group = &t;
- t.h (h);
+ t.h = &search<cxx::hxx> (t.dir, t.name, nullptr, nullptr);
+ t.h->group = &t;
- cxx::cxx& c (search<cxx::cxx> (t.dir, t.name, nullptr, nullptr));
- c.group = &t;
- t.c (c);
+ t.c = & search<cxx::cxx> (t.dir, t.name, nullptr, nullptr);
+ t.c->group = &t;
bool inl (true);
if (auto val = t["cli.options"])
@@ -83,9 +81,8 @@ namespace build
if (inl)
{
- cxx::ixx& i (search<cxx::ixx> (t.dir, t.name, nullptr, nullptr));
- i.group = &t;
- t.i (i);
+ t.i = &search<cxx::ixx> (t.dir, t.name, nullptr, nullptr);
+ t.i->group = &t;
}
}
@@ -132,7 +129,7 @@ namespace build
// For ixx{}, verify it is part of the group.
//
- if (t.is_a<cxx::ixx> () && g->i () == nullptr)
+ if (t.is_a<cxx::ixx> () && g->i == nullptr)
{
level3 ([&]{trace << "generation of inline file " << t
<< " is disabled with --suppress-inline";});
@@ -154,10 +151,10 @@ namespace build
// Derive file names for the members.
//
- t.h ()->derive_path ();
- t.c ()->derive_path ();
- if (t.i () != nullptr)
- t.i ()->derive_path ();
+ t.h->derive_path ();
+ t.c->derive_path ();
+ if (t.i != nullptr)
+ t.i->derive_path ();
// Inject dependency on the output directory.
//
@@ -228,10 +225,10 @@ namespace build
// See if we need to pass any --?xx-suffix options.
//
- append_extension (args, *t.h (), "--hxx-suffix", "hxx");
- append_extension (args, *t.c (), "--cxx-suffix", "cxx");
- if (t.i () != nullptr)
- append_extension (args, *t.i (), "--ixx-suffix", "ixx");
+ append_extension (args, *t.h, "--hxx-suffix", "hxx");
+ append_extension (args, *t.c, "--cxx-suffix", "cxx");
+ if (t.i != nullptr)
+ append_extension (args, *t.i, "--ixx-suffix", "ixx");
append_options (args, t, "cli.options");
@@ -283,10 +280,10 @@ namespace build
//
bool r (false);
- if (t.i () != nullptr)
- r = rmfile (t.i ()->path (), *t.i ()) || r;
- r = rmfile (t.c ()->path (), *t.c ()) || r;
- r = rmfile (t.h ()->path (), *t.h ()) || r;
+ if (t.i != nullptr)
+ r = rmfile (t.i->path (), *t.i) || r;
+ r = rmfile (t.c->path (), *t.c) || r;
+ r = rmfile (t.h->path (), *t.h) || r;
t.mtime (timestamp_nonexistent);