aboutsummaryrefslogtreecommitdiff
path: root/build2/utility.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/utility.cxx')
-rw-r--r--build2/utility.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/build2/utility.cxx b/build2/utility.cxx
index b0325fb..36f8a4d 100644
--- a/build2/utility.cxx
+++ b/build2/utility.cxx
@@ -266,17 +266,17 @@ namespace build2
const dir_path empty_dir_path;
void
- append_options (cstrings& args, const lookup& l)
+ append_options (cstrings& args, const lookup& l, const char* e)
{
if (l)
- append_options (args, cast<strings> (l));
+ append_options (args, cast<strings> (l), e);
}
void
- append_options (strings& args, const lookup& l)
+ append_options (strings& args, const lookup& l, const char* e)
{
if (l)
- append_options (args, cast<strings> (l));
+ append_options (args, cast<strings> (l), e);
}
void
@@ -287,26 +287,32 @@ namespace build2
}
void
- append_options (cstrings& args, const strings& sv, size_t n)
+ append_options (cstrings& args, const strings& sv, size_t n, const char* e)
{
if (n != 0)
{
args.reserve (args.size () + n);
for (size_t i (0); i != n; ++i)
- args.push_back (sv[i].c_str ());
+ {
+ if (e == nullptr || e != sv[i])
+ args.push_back (sv[i].c_str ());
+ }
}
}
void
- append_options (strings& args, const strings& sv, size_t n)
+ append_options (strings& args, const strings& sv, size_t n, const char* e)
{
if (n != 0)
{
args.reserve (args.size () + n);
for (size_t i (0); i != n; ++i)
- args.push_back (sv[i]);
+ {
+ if (e == nullptr || e != sv[i])
+ args.push_back (sv[i]);
+ }
}
}