reddit / emacs

emacs's substitution for (*CMake Tools* extension in vscode) in C++

Financial-Bet2253 · 2022-06-13 13:31
I write C++ program. In vscode, when the project is built with CMake, and when \*CMake Tools\* is installed: if I define any executable targets via CMake, CMake Tools will be aware of them and allow me to start debugging, running or testing any of these targets. https://preview.redd.it/bv5lm8hx4e591.png?width=1602&format=png&auto=webp&s=3efe59cc5de7e77873e3b6770bfb2e53b95ad3a5 If it's possible to do these work in emacs? For debugging, I know that I could write launch.json files and use dap-mode. But! What if there's bunch of executable files?
konrad1977 · 2022-06-13 13:33
Checkout `compilation-mode`. I think its all you need (even if I dont use it).
yyoncho · 2022-06-13 15:13
you may open a feature request in dap-mode. There is helm-make-projectile so I guess it won't be hard to implement a helper function that can create debug configurations
Horrih · 2022-06-13 15:22
Not sure how relevant given that we use qmake + GNU make here, and my usecase is somewhat simpler than yours but here is my setup : I define several commands in elisp : - compile all - compile current file - test all - test current file The commands are really simple : get the current file name (Foo.cpp) build the appropriate target (Foo.o for build, FooTest for tests). Then it runs compile "make <target> I don't need the debugger much these days so I use a generic launch.json file for dap mode
alex_x_xpp · 2022-06-13 18:35
>compilation-mode does it really can do anything more than just invoke user-specified shell? >CMake Tools will be aware of them and allow me to start debugging, running or testing any of these targets. something like [https://github.com/atilaneves/cmake-ide](https://github.com/atilaneves/cmake-ide) but it seems obsolete and doesn't really have much of advanced logic
Financial-Bet2253 · 2022-06-14 05:40
>ou may open a feature OK! I think so