summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-09-11 19:00:52 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-09-11 19:00:52 (GMT)
commit028b7636b8f730926eb15e03045859e4566398b7 (patch)
treefa0da77f143c38d776deec249a9ad18656a4a732 /Source
parenta2e547cec7a525530560140494a74ef4ec35968b (diff)
parent11a6dac1e3ab9f93fbf764ec0eb898b20152a762 (diff)
downloadCMake-028b7636b8f730926eb15e03045859e4566398b7.zip
CMake-028b7636b8f730926eb15e03045859e4566398b7.tar.gz
CMake-028b7636b8f730926eb15e03045859e4566398b7.tar.bz2
Merge topic 'ninja-cmcldeps-first-line'
11a6dac Ninja: don't suppress warning about compiler options
Diffstat (limited to 'Source')
-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);
}