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