(projectRoot: string)
| 349 | * Returns paths relative to projectRoot. |
| 350 | */ |
| 351 | export function loadCppIncludeDirs(projectRoot: string): string[] { |
| 352 | const cached = cppIncludeDirCache.get(projectRoot); |
| 353 | if (cached !== undefined) return cached; |
| 354 | |
| 355 | const dirs = loadCppIncludeDirsFromCompileDB(projectRoot) |
| 356 | || loadCppIncludeDirsHeuristic(projectRoot); |
| 357 | |
| 358 | cppIncludeDirCache.set(projectRoot, dirs); |
| 359 | return dirs; |
| 360 | } |
| 361 | |
| 362 | /** |
| 363 | * Try to load include directories from compile_commands.json. |
no test coverage detected