CLI: case-insensitive ignorepath matching in Windows.

This commit is contained in:
Kimmo Varis 2011-10-02 12:02:07 +03:00
parent 4ef4cb26e9
commit 06f9d310ce
1 changed files with 7 additions and 1 deletions

View File

@ -130,7 +130,13 @@ bool CppCheckExecutor::parseFromArgs(CppCheck *cppcheck, int argc, const char* c
std::vector<std::string>::iterator iterBegin = filenames.begin();
for (int i = (int)filenames.size() - 1; i >= 0; i--)
{
if (matcher.Match(filenames[(unsigned int)i]))
#if defined(_WIN32)
// For Windows we want case-insensitive path matching
const bool caseSensitive = false;
#else
const bool caseSensitive = true;
#endif
if (matcher.Match(filenames[(unsigned int)i], caseSensitive))
filenames.erase(iterBegin + i);
}
}