summaryrefslogtreecommitdiffstats
path: root/Source/cmcldeps.cxx
diff options
context:
space:
mode:
authorPeter Kümmel <syntheticpp@gmx.net>2012-09-04 18:23:53 (GMT)
committerPeter Kümmel <syntheticpp@gmx.net>2012-09-04 18:23:53 (GMT)
commit11a6dac1e3ab9f93fbf764ec0eb898b20152a762 (patch)
tree6d57f1e8b015ec21aa3f4d7bbd47ed038cca5415 /Source/cmcldeps.cxx
parent508ed6940b447c2fb6b5fe4f036138ce57ab3c4c (diff)
downloadCMake-11a6dac1e3ab9f93fbf764ec0eb898b20152a762.zip
CMake-11a6dac1e3ab9f93fbf764ec0eb898b20152a762.tar.gz
CMake-11a6dac1e3ab9f93fbf764ec0eb898b20152a762.tar.bz2
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.
Diffstat (limited to 'Source/cmcldeps.cxx')
-rw-r--r--Source/cmcldeps.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index 69df88d..34350bf 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);
}