[cmake-developers] [Review Request] New module: IncludeUrl

Brad King brad.king at kitware.com
Thu Oct 8 11:48:06 EDT 2015


On 10/07/2015 10:15 AM, Daniele E. Domenichelli wrote:
> Please review the "IncludeUrl" topic[1] that adds a new "IncludeUrl"
> module. This module adds the include_url command that is useful to
> download and include other CMake modules from a given url.

I wish you had come asking about this proposal to hold discussion
before going through all the work to implement this.  I do not
think this is a good idea as proposed, at least for deployment
with upstream CMake.

> The main use case for such a module is for groups that have several
> projects or CMake scripts, handled by different developers, that import
> the same CMake module that is sometimes updated, and they want to keep
> these files synchronized in all the projects. This is very hard to
> achieve when the developers are many and don't care too much about the
> build system. Instead of adding this file to each project, this module
> allows to put it somewhere, and automatically download and include it
> when required.

This means the module is not versioned with the includers and could
break them with an update.  If EXPECTED_HASH is used then the includer
must be modified whenever there is an update anyway.  If EXPECTED_HASH
is not used then you're running code downloaded over a network with
no chance to check it.

Instead the common files can come with some external package and found
with find_package.  Then at least some versioning can be done.  See
KDE's extra-cmake-modules for example.

-Brad



More information about the cmake-developers mailing list