Find compile_commands.json in build directory or project root.
()
| 28 | |
| 29 | |
| 30 | def find_compile_commands() -> Optional[Path]: |
| 31 | """Find compile_commands.json in build directory or project root.""" |
| 32 | project_dir = Path(__file__).parent.parent |
| 33 | build_dir = project_dir / "build" |
| 34 | |
| 35 | # Check build directory first |
| 36 | build_commands = build_dir / "compile_commands.json" |
| 37 | if build_commands.exists(): |
| 38 | return build_commands |
| 39 | |
| 40 | # Check project root |
| 41 | root_commands = project_dir / "compile_commands.json" |
| 42 | if root_commands.exists(): |
| 43 | return root_commands |
| 44 | |
| 45 | return None |
| 46 | |
| 47 | |
| 48 | def get_system_include_args() -> List[str]: |