I’m coding a c++ project in vim.
I’d like to run a ctags command (ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .) to generate references when I run make.
I think the way to do it is to use add_custom_command but I get confused on how to integrate it into CMakeLists.txt .
The most basic way to do this is:
The first line tells
CMakethattagswill be generated. Theadd_custom_commandisCMakewill generatetagswhen needed, and finally, some target needs to depend ontags. The default working directory is in the build tree, soWORKING_DIRECTORYmust be set to your source tree. This is equivalent a Makefile entry: