Ninja: don't suppress warning about compiler options

Warnings about invalid compiler options are printed first
by cl.exe, this line was suppressed when the source file
name didn't contain back slashes.
This commit is contained in:
Peter Kümmel 2012-09-04 20:23:53 +02:00
parent 508ed6940b
commit 11a6dac1e3
1 changed files with 3 additions and 1 deletions

View File

@ -238,7 +238,9 @@ int main() {
// needed to suppress filename output of msvc tools
std::string srcfilename;
std::string::size_type pos = srcfile.rfind("\\");
if (pos != std::string::npos) {
if (pos == std::string::npos) {
srcfilename = srcfile;
} else {
srcfilename = srcfile.substr(pos + 1);
}