[Cmake-commits] CMake branch, next, updated. v3.5.0-546-g491b222

Brad King brad.king at kitware.com
Mon Mar 21 09:07:12 EDT 2016


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  491b222ec2c1863e75517fda010b7e7a9e079dff (commit)
       via  6f4f90548353d9e329bd4ddb2f7492788f28f0e1 (commit)
      from  020f72fae1990c8da4e291e7cd07b6b220a85d05 (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=491b222ec2c1863e75517fda010b7e7a9e079dff
commit 491b222ec2c1863e75517fda010b7e7a9e079dff
Merge: 020f72f 6f4f905
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Mar 21 09:07:11 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 21 09:07:11 2016 -0400

    Merge topic 'fix-repeat-pkg-config' into next
    
    6f4f9054 FindPkgConfig: set correctly named variables in cache (#15903)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f4f90548353d9e329bd4ddb2f7492788f28f0e1
commit 6f4f90548353d9e329bd4ddb2f7492788f28f0e1
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Fri Mar 18 15:48:56 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Mar 21 08:58:12 2016 -0400

    FindPkgConfig: set correctly named variables in cache (#15903)
    
    The fix in commit v3.5.0-rc1~27^2 (FindPkgConfig: set standard variables
    in the cache, 2016-01-20) added the wrong variable name to the cache.
    The test was only testing that the cache variable existed, not that it
    also had the correct value.  Update the test to ensure that the cache
    value matches the local variable value.
    
    Reported-by: Bernd Lörwald

diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 4f50e38..447c526 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -383,7 +383,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
         pkg_get_variable("${_pkg_check_prefix}_INCLUDEDIR" ${_pkg_check_modules_pkg} "includedir")
         pkg_get_variable("${_pkg_check_prefix}_LIBDIR" ${_pkg_check_modules_pkg} "libdir")
         foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
-          _pkgconfig_set("${_pkg_check_modules_pkg}_${variable}" "${${_pkg_check_modules_pkg}_${variable}}")
+          _pkgconfig_set("${_pkg_check_prefix}_${variable}" "${${_pkg_check_prefix}_${variable}}")
         endforeach ()
 
         if (NOT ${_is_silent})
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
index 8d8d000..d0046ca 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
@@ -1,14 +1,15 @@
+cmake_minimum_required(VERSION 3.3)
+
 find_package(PkgConfig REQUIRED)
 pkg_check_modules(NCURSES QUIET ncurses)
 
 if (NCURSES_FOUND)
   foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
-    get_property("${variable}"
+    get_property(value
       CACHE     "NCURSES_${variable}"
-      PROPERTY  TYPE
-      SET)
-    if (NOT ${variable})
-      message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}")
+      PROPERTY  VALUE)
+    if (NOT value STREQUAL NCURSES_${variable})
+      message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}:\nexpected -->${value}<--\nreceived -->${NCURSES_${variable}}<--")
     endif ()
   endforeach ()
 else ()

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

Summary of changes:
 Modules/FindPkgConfig.cmake                                 |    2 +-
 .../FindPkgConfig/FindPkgConfig_cache_variables.cmake       |   11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list