Skip to content

zoenglinghou/catkin-compile-commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published