|
|
@@ -1171,7 +1171,8 @@ void cmGlobalNinjaGenerator::AddAdditionalCleanFile(std::string fileName,
|
|
|
}
|
|
|
|
|
|
void cmGlobalNinjaGenerator::AddCXXCompileCommand(
|
|
|
- const std::string& commandLine, const std::string& sourceFile)
|
|
|
+ const std::string& commandLine, const std::string& sourceFile,
|
|
|
+ const std::string& objPath)
|
|
|
{
|
|
|
// Compute Ninja's build file path.
|
|
|
std::string buildFileDir =
|
|
|
@@ -1205,7 +1206,9 @@ void cmGlobalNinjaGenerator::AddCXXCompileCommand(
|
|
|
<< R"( "command": ")"
|
|
|
<< cmGlobalGenerator::EscapeJSON(commandLine) << "\",\n"
|
|
|
<< R"( "file": ")"
|
|
|
- << cmGlobalGenerator::EscapeJSON(sourceFileName) << "\"\n"
|
|
|
+ << cmGlobalGenerator::EscapeJSON(sourceFileName) << "\",\n"
|
|
|
+ << R"( "output": ")"
|
|
|
+ << cmGlobalGenerator::EscapeJSON(objPath) << "\"\n"
|
|
|
<< "}";
|
|
|
/* clang-format on */
|
|
|
}
|