[CMake] Interest in adding to CMake the CMakeGet module to get dependencies

paul pfultz2 at yahoo.com
Fri Aug 4 15:57:53 EDT 2017


Hi,

I have a written a cmake module to get dependencies using the cget protocol
here:

https://github.com/pfultz2/cmake-get

This is different than `ExternelProject`:

* `ExternelProject` happens only during build, which allows this module to
work in both in config and script mode. 

* In config mode, the user can just do:

cmake_get(<pkg> PREFIX ${CMAKE_CURRENT_BINARY_DIR}/deps)
find_package(<pkg> HINTS ${CMAKE_CURRENT_BINARY_DIR}/deps)

Since the dependency is available at config time.

* A script can be easily written to download the dependencies, which is much
better approach to deal with toolchain transitivity, which is a problem that
exists with both `ExternelProject` and config mode.

* Recipes can be reused for building projects that don't use cmake, or don't
follow the standard cmake installation flow. Furthermore, an existing cget
recipe can be used as well.

Is there interest in this project? Of course, the protocol for getting
dependencies could be tweaked as based on feedback. I am the author of both
this module and cget so it is possible to update cget to match feedback from
the larger cmake community.

Thanks,
Paul



More information about the CMake mailing list