mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-20 12:53:55 +08:00
Ninja: Remove unnecessary newlines in compile commands
This commit is contained in:
@@ -1009,7 +1009,7 @@ void cmGlobalNinjaGenerator::AddCXXCompileCommand(
|
|||||||
// Get a stream where to generate things.
|
// Get a stream where to generate things.
|
||||||
this->CompileCommandsStream =
|
this->CompileCommandsStream =
|
||||||
cm::make_unique<cmGeneratedFileStream>(buildFilePath);
|
cm::make_unique<cmGeneratedFileStream>(buildFilePath);
|
||||||
*this->CompileCommandsStream << "[";
|
*this->CompileCommandsStream << "[\n";
|
||||||
} else {
|
} else {
|
||||||
*this->CompileCommandsStream << "," << std::endl;
|
*this->CompileCommandsStream << "," << std::endl;
|
||||||
}
|
}
|
||||||
@@ -1021,7 +1021,7 @@ void cmGlobalNinjaGenerator::AddCXXCompileCommand(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
*this->CompileCommandsStream << "\n{\n"
|
*this->CompileCommandsStream << "{\n"
|
||||||
<< R"( "directory": ")"
|
<< R"( "directory": ")"
|
||||||
<< cmGlobalGenerator::EscapeJSON(buildFileDir) << "\",\n"
|
<< cmGlobalGenerator::EscapeJSON(buildFileDir) << "\",\n"
|
||||||
<< R"( "command": ")"
|
<< R"( "command": ")"
|
||||||
|
Reference in New Issue
Block a user