[cmake-developers] pkg_check_modules does not respond to changes.

Matthew Hanna (BLOOMBERG/ 731 LEX) mhanna21 at bloomberg.net
Wed Jan 18 10:12:53 EST 2017


There is an optimization in pkg_check_modules that skips processing
once a successful execution has occurred and simply leaves the cached
return variables as is.  As currently implemented, any changes to the
parameters of pkg_check_modules, excluding PREFIX, will be ignored
following a successful execution.  Workarounds include modifying the
PREFIX and all references to it, or starting over from an empty build
directory.  Adding a pkg-config dependency after the initial
configuration is a regular part of our development workflow and the
existing workarounds are cumbersome.

I would like to enhance the behavior of pkg_check_modules to store the
parameters for a given PREFIX so that changes to those parameters can
disable the optimization and re-evaluate pkg_check_modules.

Are there any concerns about or objections to adding this behavior?

If not, should this change in behavior be noted in the documentation?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170118/30707ab1/attachment.html>


More information about the cmake-developers mailing list