DEPRECATING! This pull request takes away the need for this script!
This will generate a compile_commands.json
file based on a gradleRIO project.
For some reason, the clangd plugin for vscode and various autocomplete plugins for vim don't seem to like the compile_commands.json
file that gradlew creates. They do, however, provide wonderful autocomplete with the file generated by my script for some reason.
$ chmod +x ./rioCDGen.py # do this once
$ ./rioCDGen.py --help
usage: rioCDGen.py [-h] [--compiler COMPILER] [--build-type {Debug,Release}] [--year YEAR] [--source SOURCE] [--pretty]
Generate a compile_commands.json for an frc gradle project
optional arguments:
-h, --help show this help message and exit
--compiler COMPILER path to the cross-compiler that gradleRIO uses. If not specified, the script will search for it
--build-type {Debug,Release}, -bt {Debug,Release}
The type of build. Can be Debug or Release. Defaults to Debug
--year YEAR, -y YEAR The year of the toolchain/project. Defaults to the current year
--source SOURCE, -S SOURCE, -s SOURCE
The root directory of the project(should be the directory with your build.gradle file. Defaults to cwd
--pretty pretty prints the ouput
note: run this in the project directory or use the -S option
- python3
- Linux
- MaxOS
- Windows
more customizabilityimplemented in f05923c- make it a pip package?
make it cross platform