[CMake] is it possible to download CMake modules at configure time?

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Fri Apr 5 12:13:52 EDT 2013


Hi Radovan,

This is possible. You could look at the approach we consider in CTK.
See
https://github.com/commontk/CTK/compare/00694c9f8a0da6ee28fb079902e6a8c3ec428058...891aa5443b110cc7e6aa0ec1339aad4b2c83ef9d

Hth
Jc


On Fri, Apr 5, 2013 at 12:03 PM, radovan bast <
radovan.bast at irsamc.ups-tlse.fr> wrote:

> dear CMake developers and users,
>
> first of all, a big thanks for the CMake developers
> for a great product! we like CMake a lot.
>
> we are extensively using CMake external project support
> in combination with Git submodules in a number of larger
> projects and that works nicely.
>
> my question is: could i do something similar with CMake
> modules? is it possible to start with a minimal core
> CMakeLists.txt which would fetch other CMake modules from an
> external public (Git) repository
> and use them to configure the project?
>
> the motivation for this is that we have several projects
> with rather complex CMake infrastructures. the projects
> are independent, live on different repositories, but the
> CMake infrastructures are to a large extent overlapping.
> currently we synchronize the CMake code between these projects
> manually but this is not great and there is the risk that
> the codes will diverge, that wheels will be reinvented,
> and that improvements are not communicated between the projects.
> this could be avoided if the CMake code was not explicitly
> present but fetched from a repository which would also
> enforce (or encourage) communicating all improvements
> to the same place. everything that is generic and not project
> specific would go into that external repo, only project specific
> things would be kept in the minimal core CMakeLists.txt.
>
> i will appreciate any pointers and suggestions
> on how i could implement such a scheme.
>
> thanks and best regards,
>   radovan
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>



-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130405/16b6537e/attachment.htm>


More information about the CMake mailing list