forked from qt-creator/qt-creator
ClangCodeModel: Use more suitable location for compile_commands.json
... for clangd. Putting it in the build directory seems sensible in principle, but that can be problematic for in-source builds. So introduce another level of nesting to prevent conflicts. Fixes: QTCREATORBUG-26431 Change-Id: Id66aa0852d206695f2fc2ec42292b1cecefe2b59 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -286,7 +286,7 @@ void ClangModelManagerSupport::updateLanguageClient(
|
||||
if (const ProjectExplorer::Target * const target = project->activeTarget()) {
|
||||
if (const ProjectExplorer::BuildConfiguration * const bc
|
||||
= target->activeBuildConfiguration()) {
|
||||
return bc->buildDirectory();
|
||||
return bc->buildDirectory() / ".qtc_clangd";
|
||||
}
|
||||
}
|
||||
return Utils::FilePath();
|
||||
@@ -363,7 +363,7 @@ void ClangModelManagerSupport::updateLanguageClient(
|
||||
});
|
||||
|
||||
});
|
||||
auto future = Utils::runAsync(&Internal::generateCompilationDB, projectInfo,
|
||||
auto future = Utils::runAsync(&Internal::generateCompilationDB, projectInfo, jsonDbDir,
|
||||
CompilationDbPurpose::CodeModel,
|
||||
warningsConfigForProject(project),
|
||||
optionsForProject(project));
|
||||
|
||||
Reference in New Issue
Block a user