mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-18 01:31:04 -05:00
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:
@@ -238,7 +238,9 @@ int main() {
|
|||||||
// needed to suppress filename output of msvc tools
|
// needed to suppress filename output of msvc tools
|
||||||
std::string srcfilename;
|
std::string srcfilename;
|
||||||
std::string::size_type pos = srcfile.rfind("\\");
|
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);
|
srcfilename = srcfile.substr(pos + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user