From fd641f3f10499d4368822b0776ded4c47f152ae7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 15 Jul 2016 08:30:31 +0200 Subject: Name and cleanup extra VC files (.pdb, .ilk, .idb) --- build2/utility.cxx | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'build2/utility.cxx') diff --git a/build2/utility.cxx b/build2/utility.cxx index 8b772e0..5fcdebf 100644 --- a/build2/utility.cxx +++ b/build2/utility.cxx @@ -177,15 +177,34 @@ namespace build2 } bool - find_option (const char* option, const lookup& l) + find_option (const char* option, const lookup& l, bool ic) { - if (l) + return l && find_option (option, cast (l), ic); + } + + bool + find_option (const char* option, const strings& strs, bool) + { + //@@ TODO ignore case + + for (const string& s: strs) { - for (const string& s: cast (l)) - { - if (s == option) - return true; - } + if (s == option) + return true; + } + + return false; + } + + bool + find_option (const char* option, const cstrings& cstrs, bool) + { + //@@ TODO ignore case + + for (const char* s: cstrs) + { + if (s != nullptr && strcmp (s, option) == 0) + return true; } return false; -- cgit v1.1