Merge topic 'ninja-cmcldeps-first-line'

11a6dac Ninja: don't suppress warning about compiler options
This commit is contained in:
Brad King 2012-09-11 15:00:52 -04:00 committed by CMake Topic Stage
commit 028b7636b8
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);
}