[CMake] Create not builded executable in Visual Studio

Theo Diefenthal diefenthal at ifi.uzh.ch
Wed Oct 9 11:02:44 EDT 2013


Hi there,

sometimes I like to debug my executable in two instances simultaneously.
E.g. if I have a function which works sometimes and sometimes not, I
like to grab both cases and go through it step by step.

In Visual Studio, it is not trivial, but also not too hard, to setup a
project twice in order to debug two instances of it. One can either
start the debug executable from outside the debugger and attach to it
afterwards, or one creates an empty project for that like explained here:
http://stackoverflow.com/questions/5498911/run-multiple-instances-with-one-click-in-visual-studio

What I now would like to have is a CMakeLists in which I have an option
saying BUILD_DUMMY_PROJECT_FOR_DEBUG_INSTANCE and if the users chooses
YES, then this should be setup accordintly.
Introducing an option and make something run if it is checked is fairly
trivial, but I have no idea how to execute the concrete steps in this
guide, i.e. How can I set the debugging command, take it out of the
ALL_BUILD/standard project build steps and set this Multiple Startup
Projects??? Are there even options to go that deep into Visual Studio
config from CMake?

Best regards
Theo


More information about the CMake mailing list