[CMake] [VS gen] Multiple configurations code
Hendrik Sattler
post at hendrik-sattler.de
Tue Jul 27 08:00:40 EDT 2010
Zitat von David Cole <david.cole at kitware.com>:
> On Tue, Jul 27, 2010 at 5:45 AM, Verweij, Arjen
>> I hear what you are saying, but a lot of legacy Makefile based system
>> support "make" and "make debug" alongside each other. I'm still looking for
>> the cmake way to easily mark a small part of a project to be built with
>> debug flags. For instance, if you have functionality in a static archive,
>> you just link the new debug enabled object file against the main.o and the
>> archive and you end up with some debugging symbols in no time.
>
> Replicating that with CMake should be possible, too, but it's not the
> typical everyday use case.
If the cmake source scanner can detect (not sure) the usage of
#ifdef MY_DEBUG
then that's all that is needed to achieve that:
cmake -DENABLE_MY_DEBUG=ON .
make
Not everything that looks like debug stuff must be coupled with a
"debug" build type. It can as well only define the default for MY_DEBUG.
If it cannot detect this, use a config.h. That it certainly can.
HS
More information about the CMake
mailing list