[cmake-developers] Mixing generator expressions and debug|optimized|general keywords in target_link_libraries()

Nils Gladitz nilsgladitz at gmail.com
Tue Sep 2 10:40:26 EDT 2014


On 09/02/2014 04:12 PM, Brad King wrote:
> On 08/29/2014 05:26 AM, Nils Gladitz wrote:
> Steve K and I discussed this once.  Since DEBUG_CONFIGURATIONS can be
> set differently in exporting and importing projects so there is no
> global meaning across all targets.  See the
> cmTarget::GetDebugGeneratorExpressions method:
>
>   http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmTarget.cxx;hb=v3.0.1#l908
>
> It constructs a $<OR:...> expression of $<CONFIG:...> expressions
> for each entry in DEBUG_CONFIGURATIONS.  This is how
> target_link_libraries transforms debug/optimized keywords when
> constructing the INTERFACE_LINK_LIBRARIES value.

For some reason I thought RelWithDebInfo was per default a debug 
configuration but that does not actually seem to be the case.

Given that Debug is the only (default) configuration in the set that 
simplifies things greatly - for me at least :p

I'll manually transform the library lists until FindBoost.cmake exports 
targets or Boost itself provides a config file.

Thanks!

Nils



More information about the cmake-developers mailing list