aboutsummaryrefslogtreecommitdiff
path: root/build2/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-08-06 14:23:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-08-06 14:23:38 +0200
commit4a853594b0a27dca6576c64d7bb8e6f9340b066f (patch)
tree1fdaad73daabd80543106ca25cc883eec1c76e60 /build2/utility.cxx
parent55bc2627dcca7f126580a0d89d786004dab2653c (diff)
Filter out warning as error options during preprocessing
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]);
+ }
}
}