On 3/13/2012 3:25 PM, Alexander Neundorf wrote:
How about this:
* no policy
* new argument find_package( OPTIONAL_COMPONENTS), so we get two sets of
components
* the components are still ignored by find_package() for setting Foo_FOUND
* I add some code to FPHSA so it handled COMPONENTS and REQUIRED_COMPONENTS as
done in my branch (i.e. COMPONENTS are required, OPTIONAL_COMPONENTS not)
* I maybe add something to @PACKAGE_INIT@ to help Config files handle
components as recommended

This way we could recommend to handle components in some way, and make it easy
for developers to follow the recommendation.

Sounds good!

Rather than two separate lists of components perhaps the

 <pkg>_FIND_REQUIRED_<component>

variables could have the value "OPTIONAL" instead of "1" when a
given component is optional.  This will probably simplify code
dealing with components because it needs to loop over only one
list and won't have to worry about whether a component can appear
in both lists.

Thanks,
-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to