Sublime Forum

Linux / cmake && C++ Build System

#1

I am on a dev team that develops and maintains a product, mostly written in C++, and uses CMake as the build system. The project has almost 30K source files.

Most team members use VS code or qtCreator, with a very few using CLion. I find these IDEs a bit cumbersome, take a long time to load, and bog down a bit…

I very much prefer using sublime_text 4 as my editor, but the problem is my current process… I edit a file, switch to terminal, build, test, rinse repeat. I do not have step-by-step debugging, git integration etc. I would like very much to be able to do everything within sublime_text. I know there has probably been tons of questions on build systems in sublime_text…

So, basically, I clone our project, run our configure script, which creates an out-of-source build folder, runs cmake, sets up env vvariables etc. and then I can switch to the build folder, build (make/g++ etc.)

What I want to do is to integrate as many of these steps as possible within sublime_text, and basically create a sublime_text based IDE.

My questions are:

  1. Is there a plugin that I can install that will setup all of this for me, or do I need to create my own build system from scratch?

  2. As described above, I can configure our project using cmake on the command line, and all I need to do is be able to run make in the build folder. Is that all I need to setup in the build system to compile? i.e. just set up sublime to run the make command?

  3. I think (2) would give me the ability to compile/build but it gives me no debugging, with line-by-line visual debugging. Is it possible to setup line-by-line debugging? If there is a plugin for that, any recommendations?

Thanks
GC

0 Likes

#2

3… Debugger package
2… Build Systems can run CLI tools. I recommend Terminus if you need interactive builds
1… Not sure if a plugin will do it for you.

Others will chime in with more details response I’m sure

0 Likes

#3

I may be wrong but I think you can create a custom build target to use cmake from within sublime with a shortcut. That should cover point 2.

0 Likes

#4

You could try https://packagecontrol.io/packages/CMakeBuilder.

A good git integratration is provided by https://packagecontrol.io/search/Gitsavvy.

0 Likes