[CMake] Contribute Find-module to CMake vs Config-file to upstream

Johannes Zarl-Zierl johannes.zarl-zierl at jku.at
Tue May 22 06:27:22 EDT 2018


Hi Mateusz,

On Montag, 21. Mai 2018 19:39:16 CEST Mateusz Loskot wrote:
> The FindLZ4 discussion basically ended with suggestion from Brad that,
> instead of adding Find-module to CMake, I should approach LZ4 project
> and add Config-file to the library itself.
> Then I argued taht Config-files are more complex and I don't feel like
> asking projects, which I don't maintain myself, to accept the extra
> complexity

There's more that we (as CMake community) could do to make it easier for non-
cmake projects to add a config file, and I think this is a worthwhile goal.

Currently, if the maintainer of an autotools-based project is willing to add a 
cmake config file, he or she basically needs to be an expert on cmake. There's 
no official template or guide on how to create a cmake config file without relying 
on a cmake module to do the work.

If there was a good guide, or maybe even some tooling, cmake config files would 
not be much more work for the maintainer as pkg-config files.

> I call CMake to accept *any* Find-module, filtering only based on
> quality of CMake
> idiomatic scripting.

"Filtering based on quality" being the important part.

> If CMake does not want Find-* modules within the source tree, then
> - set up https://gitlab.kitware.com/cmake/find-modules
> - move all existing Find-modules in there
> - relax maintenance rules to accept *any* Find-module, provided
> --- CMake scripting is decent quality (e.g no community downvotes or
> rejecting reviews for period of quarantine)
> --- CI passing tests
> - finally, include the complete find-modules archive in the installer
> so it is deployed
>    aside of CMake itself

That seems like a reasonable way to deal with the situation. Maybe this would 
also encourage better quality of the (current) core find-modules. If you take a 
look at those, they are in wildly different shape regarding their quality.

> If CMake does not care about Find-modules, it should not care or
> should care about
> them equally

ACK.

Cheers,
  Johannes



More information about the CMake mailing list