On Wednesday 22 February 2012, Brad King wrote:
> On 2/21/2012 5:09 PM, Alexander Neundorf wrote:
> > This is now in the FindPackage_CONFIG_MODULEKeywordsFirst branch on
> > stage,
> 
> [snip]
> 
> > There is the potential issue with "CONFIG" and "MODULE" being in use as
> > module names already somewhere.
> 
> Yes.  I hadn't actually intended for you to go straight to
> implementation with that idea.  I only intended it as a
> possibility for discussion.  

>From my side I had no need to discuss, I really like this idea.

I mean, I really like this suggestion.
Only problem is the FindCONFIG.cmake and FindMODULE.cmake case...

If we can find a way how to avoid this problem I'd be all for this solution.
Enabling the keywords MODULE and CONFIG only via a policy ?
It could warn if the name of the package is one of the known keywords or looks 
like a version number.
Not that nice, but maybe acceptable for those uncommon package names ?

Or make the keyword more unique, i.e. longer ?
find_package(CONFIG_MODE|MODULE_MODE Foo)

Doesn't look that nice, but should be safe enough.

Other ideas ?

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