[cmake-developers] Revitalize --find-package mode?
Brad King
brad.king at kitware.com
Wed Oct 2 09:59:23 EDT 2019
On 10/2/19 9:24 AM, Nagy-Egri Máté Ferenc via cmake-developers wrote:
> to obtain dependency information is no longer maintained in CMake,
> or at least discouraged for new projects.
For reference, the `cmake --find-package` mode documentation you
mentioned is here:
* https://cmake.org/cmake/help/v3.15/manual/cmake.1.html#run-the-find-package-tool
"This mode is not well-supported due to some technical limitations.
It is kept for compatibility but should not be used in new projects."
There is an issue collecting some of the problems with it:
* https://gitlab.kitware.com/cmake/cmake/issues/14676
There is another issue discussing a possible alternative:
* https://gitlab.kitware.com/cmake/cmake/issues/17236
A key difference between the two approaches is that the latter actually
enables languages and inspects the toolchain to support things like
COMPILE_FEATURES and such. However, the way all that information is
encoded in the imported targets created by `install(EXPORT)` is meant
to be consumed and transformed by CMake's generators. It may not be
easy to extract it for external use.
I've just posted some additional links in the latter issue above:
* https://gitlab.kitware.com/cmake/cmake/issues/17236#note_634094
-Brad
More information about the cmake-developers
mailing list