[cmake-developers] RFC: Helper macros for writing Find modules

Brad King brad.king at kitware.com
Fri Mar 20 13:30:53 EDT 2015


On 03/18/2015 05:50 PM, Alex Merry wrote:
> I made some changes in a copy of this module for work that separated out the 
> target creation, as well as adding debug/release support. I'll check about 
> being allowed to release that work, but I doubt it'll be an issue.

Great.  Will you be able to test this by factoring it into ECM proper?
One attractive feature of this particular work is that ECM is well
tested and widely used, so the modules can come with some maturity.

>>  Help: Drop FeatureSummary example in cmake-developer.7
>>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8235effe
> 
> One issue I realised with this after the fact is that it works poorly with 
> *Config.cmake files - if there is no find module, and the package is not found, 
> the URL telling you how to get hold of it would be missing unless you add it 
> at the find_package call site.

That's a good point.  When FeatureSummary was first introduced I always
envisioned it being used in project code near the find_package call
sites but not underneath them in the call stack.  The goal of the
*Config file approach to find_package is to have no information about
the package hard-coded in CMake, because doing so is not scalable to
every package in the world.

Thanks,
-Brad



More information about the cmake-developers mailing list