[Cmake-commits] CMake branch, next, updated. v3.7.2-2333-g7b9ff03

Brad King brad.king at kitware.com
Wed Jan 25 09:01:12 EST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  7b9ff037836da0342d173be8d74ecc44e31640db (commit)
       via  796dea67a68be432f98e2fef50059c93106557a2 (commit)
      from  3fcca6156371952688785ac354d0d4f6276400ed (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b9ff037836da0342d173be8d74ecc44e31640db
commit 7b9ff037836da0342d173be8d74ecc44e31640db
Merge: 3fcca61 796dea6
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jan 25 09:01:11 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jan 25 09:01:11 2017 -0500

    Merge topic 'pkg-config-recheck' into next
    
    796dea67 FindPkgConfig: Recheck pkg-config on parameter change.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=796dea67a68be432f98e2fef50059c93106557a2
commit 796dea67a68be432f98e2fef50059c93106557a2
Author:     Matthew Hanna <mhanna21 at bloomberg.net>
AuthorDate: Tue Jan 17 16:15:18 2017 -0500
Commit:     Matthew Hanna <mhanna21 at bloomberg.net>
CommitDate: Tue Jan 24 22:02:14 2017 -0500

    FindPkgConfig: Recheck pkg-config on parameter change.
    
    Currently, once pkg_check_modules succeeds, it will never call
    _pkg_check_modules_internal again.  That means that if the parameters
    to pkg_check_modules are changed, cmake will be called to reconfigure,
    but nothing will change.  This change is to store the full string of
    arguments to pkg_check_modules and override the FOUND optimization so
    that the arguments are reevaluated when modified.

diff --git a/Help/release/dev/pkg-config-recheck.rst b/Help/release/dev/pkg-config-recheck.rst
new file mode 100644
index 0000000..950c3c8
--- /dev/null
+++ b/Help/release/dev/pkg-config-recheck.rst
@@ -0,0 +1,7 @@
+pkg-config-recheck
+------------------
+
+* Calls to the :module:`FindPkgConfig` module :command:`pkg_check_modules`
+  command following a successful call learned to re-evaluate the cached values
+  for a given prefix after changes to the parameters to the command for that
+  prefix.
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 8b7131b..1958f4b 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -585,10 +585,13 @@ endmacro()
 macro(pkg_check_modules _prefix _module0)
   _pkgconfig_parse_options(_pkg_modules _pkg_is_required _pkg_is_silent _no_cmake_path _no_cmake_environment_path _imp_target "${_module0}" ${ARGN})
   # check cached value
-  if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
+  if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND OR NOT "${__pkg_config_arguments_${_prefix}}" STREQUAL "${_module0};${ARGN}")
     _pkg_check_modules_internal("${_pkg_is_required}" "${_pkg_is_silent}" ${_no_cmake_path} ${_no_cmake_environment_path} ${_imp_target} "${_prefix}" ${_pkg_modules})
 
     _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
+    if (${_prefix}_FOUND)
+      _pkgconfig_set(__pkg_config_arguments_${_prefix} "${_module0};${ARGN}")
+    endif()
   elseif (${_prefix}_FOUND AND ${_imp_target})
     _pkg_create_imp_target("${_prefix}" _no_cmake_path _no_cmake_environment_path)
   endif()

-----------------------------------------------------------------------

Summary of changes:
 Help/release/dev/pkg-config-recheck.rst |    7 +++++++
 Modules/FindPkgConfig.cmake             |    5 ++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 Help/release/dev/pkg-config-recheck.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list