[CMake] How to work around broken Find module

Alexander Neundorf a.neundorf-work at gmx.net
Sun Oct 31 05:20:49 EDT 2010


On Thursday 28 October 2010, Marcel Loose wrote:
> Hi all,
>
> What is the best way to work around a broken Find module?
>
> A technique I've used up till now is to wrap the broken module in a
> module with the same name that I store in my own module directory. This
> way, my wrapper module will be picked up first.

Yes.

> Problem with this
> approach is, of course, that this might break when someone is using a
> newer CMake in which the broken module has been fixed.

Where is the breakage there ?
Your module, which does what you want, still overrides the one coming from 
cmake, no matter whether that one is better or worse.
We don't have a problem with this in KDE, where we have many modules.

Do you have a specific problem with some module currently ?
If so, which one, what is the exact problem ?

> A different approach would be to copy the fixed module from the newer
> CMake and store it in my own module directory. But this might also
> break, when newer versions of CMake are released.

How does that differ from using a module which you modified ?
It is still a module which is preferred over the ones shipped with CMake.

Alex


More information about the CMake mailing list