diff options
| author | Nick Brassel <nick@tzarc.org> | 2025-05-06 09:52:41 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-06 09:52:41 +1000 |
| commit | ac991405d0c9f47e815786f4732edd00d0f4f571 (patch) | |
| tree | 218b9903db6c5dc3ff74582829787751a2ae0081 /docs/cli_commands.md | |
| parent | 842c8401452f83e691a9df97ffba52a389c885c8 (diff) | |
Deprecate `qmk generate-compilation-database`. (#25237)
Diffstat (limited to 'docs/cli_commands.md')
| -rw-r--r-- | docs/cli_commands.md | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/docs/cli_commands.md b/docs/cli_commands.md index d17b0eda23..c6a7ffe191 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md | |||
| @@ -17,7 +17,7 @@ qmk compile [-c] <configuratorExport.json> | |||
| 17 | **Usage for Keymaps**: | 17 | **Usage for Keymaps**: |
| 18 | 18 | ||
| 19 | ``` | 19 | ``` |
| 20 | qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] -kb <keyboard_name> -km <keymap_name> | 20 | qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] [--compiledb] -kb <keyboard_name> -km <keymap_name> |
| 21 | ``` | 21 | ``` |
| 22 | 22 | ||
| 23 | **Usage in Keyboard Directory**: | 23 | **Usage in Keyboard Directory**: |
| @@ -84,6 +84,25 @@ The `num_jobs` argument determines the maximum number of jobs that can be used. | |||
| 84 | qmk compile -j 0 -kb <keyboard_name> | 84 | qmk compile -j 0 -kb <keyboard_name> |
| 85 | ``` | 85 | ``` |
| 86 | 86 | ||
| 87 | **Compilation Database**: | ||
| 88 | |||
| 89 | Creates a `compile_commands.json` file. | ||
| 90 | |||
| 91 | Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! Compiling using this argument can create this for you. | ||
| 92 | |||
| 93 | **Example:** | ||
| 94 | |||
| 95 | ``` | ||
| 96 | $ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak | ||
| 97 | $ qmk compile --compiledb | ||
| 98 | Ψ Making clean | ||
| 99 | Ψ Gathering build instructions from make ........ | ||
| 100 | Ψ Found 63 compile commands | ||
| 101 | Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json | ||
| 102 | Ψ Compiling keymap with make ........ | ||
| 103 | ... build log continues ... | ||
| 104 | ``` | ||
| 105 | |||
| 87 | ## `qmk flash` | 106 | ## `qmk flash` |
| 88 | 107 | ||
| 89 | This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing) guide for more details of the available bootloaders. | 108 | This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing) guide for more details of the available bootloaders. |
| @@ -694,33 +713,6 @@ qmk format-c | |||
| 694 | qmk format-c -b branch_name | 713 | qmk format-c -b branch_name |
| 695 | ``` | 714 | ``` |
| 696 | 715 | ||
| 697 | ## `qmk generate-compilation-database` | ||
| 698 | |||
| 699 | **Usage**: | ||
| 700 | |||
| 701 | ``` | ||
| 702 | qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP] | ||
| 703 | ``` | ||
| 704 | |||
| 705 | Creates a `compile_commands.json` file. | ||
| 706 | |||
| 707 | Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! The qmk tool can build this for you. | ||
| 708 | |||
| 709 | This command needs to know which keyboard and keymap to build. It uses the same configuration options as the `qmk compile` command: arguments, current directory, and config files. | ||
| 710 | |||
| 711 | **Example:** | ||
| 712 | |||
| 713 | ``` | ||
| 714 | $ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak | ||
| 715 | $ qmk generate-compilation-database | ||
| 716 | Ψ Making clean | ||
| 717 | Ψ Gathering build instructions from make -n gh60/satan:colemak | ||
| 718 | Ψ Found 50 compile commands | ||
| 719 | Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json | ||
| 720 | ``` | ||
| 721 | |||
| 722 | Now open your dev environment and live a squiggly-free life. | ||
| 723 | |||
| 724 | ## `qmk docs` | 716 | ## `qmk docs` |
| 725 | 717 | ||
| 726 | This command starts a local HTTP server which you can use for browsing or improving the docs, and provides live reload capability whilst editing. Default port is 8936. | 718 | This command starts a local HTTP server which you can use for browsing or improving the docs, and provides live reload capability whilst editing. Default port is 8936. |
| @@ -885,3 +877,13 @@ Run single test: | |||
| 885 | ``` | 877 | ``` |
| 886 | qmk test-c --test basic | 878 | qmk test-c --test basic |
| 887 | ``` | 879 | ``` |
| 880 | |||
| 881 | ## `qmk generate-compilation-database` | ||
| 882 | |||
| 883 | **Usage**: | ||
| 884 | |||
| 885 | ``` | ||
| 886 | qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP] | ||
| 887 | ``` | ||
| 888 | |||
| 889 | This command has been deprecated as it cannot take into account configurables such as [converters](/feature_converters) or environment variables normally specified on the command line; please use the `--compiledb` flag with `qmk compile` instead. | ||
