2010/9/25 Alexander Neundorf <[email protected]>:
[..]

> The other option would be to make sure that
> INCLUDE(FindPackageHandleStandardArgs)
> when used in cmake's own module would always load
> FindPackageHandleStandardArgs.cmake from cmake, i.e. code like:
>
> GET_FILENAME_COMPONENT(_currentDir "${CMAKE_CURRENT_LIST_FILE}" PATH)
> INCLUDE("${_currentDir}/FindPackageHandleStandardArgs.cmake")
>
>
> Should all
> INCLUDE(FindPackageHandleStandardArgs)
> in all find-modules from cmake be changed to this ?

I don't think it's a good idea.
People may purposely want to override CMake provided module
in order to implement specific behavior and/or to patch locally.

> Or should maybe a new option be added to include() like
> include(FindPackageHandleStandardArgs CURRENT_DIR) ?
>
> This is actually something which is necessary relatively often, so it might
> make sense to add this option, and then all find-modules in cmake could be
> changed to use this.
>
> What do you think ?

I think we may need some sort of version handling such that

include(FindPackageHandleStandardArgs)

would be

include(FindPackageHandleStandardArgs <x.y>)

this way the may-be-provided by user FPHSA would be loaded
iff it has appropriate version (at least x.y), if not then the CMake
provided version will be loaded.

This would make include more selective about what can be loaded
and give a chance for appropriate overwrite of CMake provided package.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
cmake-developers mailing list
[email protected]
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to