[cmake-developers] Imported Locations in FindBoost.cmake

Andreas Weis der_ghulbus at ghulbus-inc.de
Mon Jun 20 01:32:17 EDT 2016


On 6/19/2016 9:17 PM, Mike Gelfand wrote:
>
> The suggested way to deal with this seems to be to use
> MAP_IMPORTED_CONFIG_<CONFIG> target properties, but I suppose it should
> only (?) be used when imported target (or target it's being linked to)
> has non-standard configurations, which isn't so in this case.
>

Alternatively, maybe it makes sense for FindBoost to simply set all
configurations explicitly?
By iterating over CMAKE_CONFIGURATION_TYPES (or inspecting
CMAKE_BUILD_TYPE for single-config generators) and using the global
property DEBUG_CONFIGURATIONS to determine whether a given configuration
needs the debug or the release binaries.

I'm still unsure what to make of the current
fallback-to-first-configuration behavior. I did not find this mentioned
anywhere in the docs, so I guess it's not a behavior one should rely upon?
I was wondering whether it would make sense to properly define what
CMake does in such a case. In particular since, as you mentioned,
package configuration files might already rely on some assumptions there.

Best regards,
Andreas


More information about the cmake-developers mailing list