[cmake-developers] Possible feature request concerning conditional linking support by generator expressions

Brad King brad.king at kitware.com
Thu Sep 26 09:12:17 EDT 2019


On 9/24/19 5:02 PM, Alan W. Irwin wrote:
> I. Possible feature request
> 
> After reading through the generator-expression documentation at
> <https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html>
> it appears for my use case (see below) I need generator expressions of
> the form
> 
> $<$<NOT:$<LINK_LANGUAGE:D>>:-pthread>
> $<$<LINK_LANG_AND_ID:D,gdc>:-pthread>
> $<$<LINK_LANG_AND_ID:D,ldc2>:-Xcc-pthread>
> $<$<LINK_LANG_AND_ID:D,dmd>:libbasename> (where libbasename is likely pthread)
> 
> where I guess (since I am pretty much a newbie with regard to detailed
> generator expressions) they would all be combined together in a list
> for a library target INTERFACE_LINK_LIBRARIES property.

I've opened an issue for that proposal and the associated use case:

* https://gitlab.kitware.com/cmake/cmake/issues/19757

-Brad


More information about the cmake-developers mailing list