[CMake] custom configuration types and linking with 3rd-party libs

Philip Lowman philip at yhbt.com
Fri Sep 5 08:01:53 EDT 2008


On Thu, Sep 4, 2008 at 5:37 PM, Brad King <brad.king at kitware.com> wrote:

> Philip Lowman wrote:
> > Ultimately, TARGET_LINK_LIBRARIES() works just fine the way it is with
> > the debug/optimized keywords satisfying normal use cases.  The
> > debug/optimized keywords are in the lexicon and they aren't going
> > anywhere.  What is the harm in accepting a patch (if a user submitted
> > one) that facilitated global association of custom build configurations
> > with the debug/optimized keywords?  I'm honestly surprised that this has
> > been hardcoded for as long as it has been.
>
> I think the best way to define meaning of the keywords is simply to
> define one global property 'DEBUG_CONFIGURATIONS':
>
> set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS Debug MyDebugConfig)
>
> The property is generic enough that it could be useful for other things
> later, so I'm willing to create it even though it extends the old way.
> The TARGET_LINK_LIBRARIES() command can use this property to define
> which configurations are associated with 'debug' (and all others with
> 'optimized').  There some subtle issues with the implementation and
> testing of the property, so I've taken care of it.


Thanks for adding this Brad.  I like your idea of one global property for
this instead of using two global variables as I originally suggested.

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080905/213c9775/attachment.htm>


More information about the CMake mailing list