diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-15 08:30:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-15 08:30:31 +0200 |
commit | fd641f3f10499d4368822b0776ded4c47f152ae7 (patch) | |
tree | c3baad2070108d925fb2dbc4f0cdafcbc4a87272 /build2/utility.cxx | |
parent | c936e5b12df7270fe2164050312967c6335afbe7 (diff) |
Name and cleanup extra VC files (.pdb, .ilk, .idb)
Diffstat (limited to 'build2/utility.cxx')
-rw-r--r-- | build2/utility.cxx | 33 |
1 files changed, 26 insertions, 7 deletions
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<strings> (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<strings> (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; |