I have a bigger CMake project which builds very slowly in CLion. I timed the following builds:
- CLion with MinGW - 9:50
- CLion with MSVC - 8:15
- ninja + MinGW - 6:50
- VisualStudio sln with precompiled headers - 1:50
The last two builds were done using command line. All four builds were done after a Clean and all using the same CMakeLists.txt. Difference between MinGW and Visual studio are that for Visual Studio precompiled headers are used for one of the libraries.
In CLion if I want to run and debug my code I have to use the MinGW build (VS debugger doesn't compare yet). As you can see the Visual Studio build is about 5 times faster, which means I now edit code in CLion and then run Visual Studio and build and debug there. I would much prefer running my code from CLion so editing, compiling and debugging is done in the same IDE. Is there something I can do to speed up CLion build times?
I got used to CLion style of IDE by using Android Studio and I would love to continue doing so. But with such slow builds I am slowly considering switching to Visual Studio for my C++ development.
Edit: forgot to mention I am using CLion 2019.3 EAP