Review Request: Append, not prepend, items to CMAKE_MODULE_PATH

Alex Merry kde at randomguy3.me.uk
Sat Jun 2 23:24:26 UTC 2012



> On June 1, 2012, 6:58 p.m., Allen Winter wrote:
> > since kdepimlibs installs a few FindFoo.cmake modules on its own, adjusting the CMAKE_MODULE_PATH to point to that installation location makes sense to me.  and prepending also makes sense.
> > 
> > 
> > Let's wait for krop to comment on this.
> > 
> > also you might consider adding the buildsystem group to this review so the CMake experts can take a look
> 
> Christophe Giboudeaux wrote:
>     Marc would know more. I think the installed FindGpgme.cmake is the reason for the CMAKE_MODULE_PATH order. FindQGpgme calls FindGpgme and expects certains variables to be set.
>

It seems a bit, well, anti-social to prepend the path.  The system path (for the modules provided by cmake itself) should never be put in CMAKE_MODULE_PATH, so I don't think it should matter for FindQGpgme whether the path is prepended or appended, but when a project initially sets CMAKE_MODULE_PATH to something in its local source directory, I think it's reasonable for that project to assume that those local modules will override any other modules from anywhere else.  KdepimLibsConfig.cmake violates that.


- Alex


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105126/#review14345
-----------------------------------------------------------


On June 2, 2012, 11:20 p.m., Alex Merry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105126/
> -----------------------------------------------------------
> 
> (Updated June 2, 2012, 11:20 p.m.)
> 
> 
> Review request for Build System and KDEPIM-Libraries.
> 
> 
> Description
> -------
> 
> Append, not prepend, items to CMAKE_MODULE_PATH
> 
> In KdepimLibsConfig.cmake, we previously prepended the cmake module path
> to CMAKE_MODULE_PATH.  This could interfere with projects that want to
> override a FindFoo.cmake script from this location (eg: provided by some
> KDE package) with one in their own source tree.
> 
> For example, it can break the build of Calligra which has a
> FindMarble.cmake script that is incompatible with one provided by some
> other KDE software.
> 
> (Question: why is this line even needed?)
> 
> 
> Diffs
> -----
> 
>   KdepimLibsConfig.cmake.in 8acbc6c0712f7536620226eb954edaf62b0d28da 
> 
> Diff: http://git.reviewboard.kde.org/r/105126/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Merry
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20120602/8a45f4a5/attachment.html>


More information about the Kde-buildsystem mailing list