rwols / CMakeBuilder

Configure, build and test a CMake project right from within Sublime Text 3.
MIT License
30 stars 14 forks source link

Switching between debug and release #13

Open dpronin opened 4 years ago

dpronin commented 4 years ago

Hi, I have used your package for a long time, thank you for the work done

I have had an issue, or question, torturing me all the way. Is there a way to switch between different multiple cmakebuilder's configurations for a user's project? For example, I have a Debug and a Release those must be configured differently, the first configuration has to be fed by -DCMAKE_BUILD_TYPE=Debug and the second with -DCMAKE_BUILD_TYPE=Release. Now I cannot specify different configurations for your package in one .sublime-project file, I have to create as many .sublime-project files as number of configurations, meanwhile for sublime text build_systems it is possible to switch among them (Tools -> Build Systems) when you're specifying them in one '.sublime-project' file

Thank you

rwols commented 4 years ago

Perhaps this problem can be solved by using a multi-config generator. The newest cmake (3.17) ships with a "ninja multi config" generator, see: https://cmake.org/cmake/help/v3.17/generator/Ninja%20Multi-Config.html

I haven't experimented with multi configuration generators other than visual studio.