From 11a6dac1e3ab9f93fbf764ec0eb898b20152a762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Tue, 4 Sep 2012 20:23:53 +0200 Subject: [PATCH] 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. --- Source/cmcldeps.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index 69df88d2a..34350bf7a 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -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); }