mirror of
https://github.com/MaskRay/ccls.git
synced 2024-12-01 20:07:08 +00:00
parent
5200f431f1
commit
373e502dd3
@ -351,8 +351,12 @@ void Project::LoadDirectory(const std::string &root, Project::Folder &folder) {
|
|||||||
folder.entries.clear();
|
folder.entries.clear();
|
||||||
if (g_config->compilationDatabaseCommand.empty()) {
|
if (g_config->compilationDatabaseCommand.empty()) {
|
||||||
CDBDir = root;
|
CDBDir = root;
|
||||||
if (g_config->compilationDatabaseDirectory.size())
|
if (g_config->compilationDatabaseDirectory.size()) {
|
||||||
sys::path::append(CDBDir, g_config->compilationDatabaseDirectory);
|
if (sys::path::is_absolute(g_config->compilationDatabaseDirectory))
|
||||||
|
CDBDir = g_config->compilationDatabaseDirectory;
|
||||||
|
else
|
||||||
|
sys::path::append(CDBDir, g_config->compilationDatabaseDirectory);
|
||||||
|
}
|
||||||
sys::path::append(Path, CDBDir, "compile_commands.json");
|
sys::path::append(Path, CDBDir, "compile_commands.json");
|
||||||
} else {
|
} else {
|
||||||
// If `compilationDatabaseCommand` is specified, execute it to get the
|
// If `compilationDatabaseCommand` is specified, execute it to get the
|
||||||
|
Loading…
Reference in New Issue
Block a user