Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikea/gen-compile-commands
Simple compile_commands.json generator
https://github.com/mikea/gen-compile-commands
Last synced: 3 months ago
JSON representation
Simple compile_commands.json generator
- Host: GitHub
- URL: https://github.com/mikea/gen-compile-commands
- Owner: mikea
- License: mit
- Created: 2024-07-25T16:25:08.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-07-25T17:39:23.000Z (5 months ago)
- Last Synced: 2024-10-06T06:56:33.974Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gen-compile-commands
Simple utility to generate `compile_commands.json` based on `compile_flags.txt`.
Without `compile_commands.json` clangd can't enumerate project files.
While include/symbol resolution works, find references and other features
that require full project scanning do not work.`gen-compile-commands` uses single `compile_flags.txt` file as a template
for all source files discovered in `--src-dir`.## Installation
`cargo install gen-compile-commands`
## Usage
```
Usage: gen-compile-commands [OPTIONS] --root --compile-flags --outOptions:
--root Root project directory, all files in `compile_commands.json` will be specified relative to this path
--compile-flags Path to the `compile_flags.txt`. Used for every file in `compile_commands.json`
--out Path to the resulting `compile_commands.json`
--src-dir Directory to scan for source files
--ext Source file extensions to include in `compile_commands.json` [default: c++ cc]
-h, --help Print help
```