mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 18:51:05 -05:00
Ninja Multi-Config: Deduplicate compile_commands.json for cross configs
compile_commands.json was being written for every permutation of cross configurations. Deduplicate so only one command is output for each configuration. Fixes: #23733
This commit is contained in:
@@ -1343,9 +1343,11 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
|
||||
}
|
||||
}
|
||||
|
||||
this->ExportObjectCompileCommand(
|
||||
language, sourceFilePath, objectDir, objectFileName, objectFileDir,
|
||||
vars["FLAGS"], vars["DEFINES"], vars["INCLUDES"], config);
|
||||
if (firstForConfig) {
|
||||
this->ExportObjectCompileCommand(
|
||||
language, sourceFilePath, objectDir, objectFileName, objectFileDir,
|
||||
vars["FLAGS"], vars["DEFINES"], vars["INCLUDES"], config);
|
||||
}
|
||||
|
||||
objBuild.Outputs.push_back(objectFileName);
|
||||
if (firstForConfig) {
|
||||
|
||||
Reference in New Issue
Block a user