zoenglinghou / catkin-compile-commands

Generates compile_commands.json using catkin.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

catkin-compile-commands

Copied from this issue. Generates compile-commands.json files using catkin and bash, used with language servers like clangd.

Prerequisites

  • jq
  • build-essentials on Debian-based, base-devel on Arch-based, or equivalent.
  • catkin

Installation

make install [PREFIX=/installation/directory]

Uninstallation

make uninstall [PREFIX=/installation/directory]

Nix Flake

nix build .

Usage

  • Build your packages using the flag -DCMAKE_EXPORT_COMPILE_COMMANDS=YES or put the following in CMakeLists.txt:
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  • Create .extended_ws in workspace root
  • Put catkin workspaces to be source'd into .extended_ws, e.g. /opt/ros/noetics
  • In catkin root directory, run
catkin-compile-commands

Restart your language server if necessary.

About

Generates compile_commands.json using catkin.

License:GNU General Public License v3.0


Languages

Language:Nix 61.7%Language:Shell 28.7%Language:Makefile 9.5%