On Tuesday 13 March 2012, Brad King wrote:
...
> > The argument parsing in cmFindPackage still has to decide what to do if a
> > component appears multiple times.
> > Error out ?
> > REQUIRED always has priority over OPTIONAL ?
> > Last one wins ?
> 
> I think error is best.  It's better to be explicit so authors do not
> assume ether way.

Ok, I'll work on it in the next days.
Regarding the error: I think (didn't check) right now cmake doesn't complain 
if I list a component multiple times:

find_package(Foo COMPONENTS bar blub bar)

If it doesn't, then I'd say

find_package(Foo COMPONENTS bar blub OPTIONAL_COMPONENTS bar)

maybe also should not lead to an error.

Alex
--

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