[Cmake-commits] CMake branch, next, updated. v3.4.2-2065-g1ca1451
Ben Boeckel
ben.boeckel at kitware.com
Thu Jan 21 10:39:28 EST 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 1ca14513c5df74ec3d4d5b9febbe1627a6a46cb9 (commit)
via 40249bccdf9c66453433da3608da9cc89cbee675 (commit)
from 38022559e9947adb274890070499c69738d0deaf (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=1ca14513c5df74ec3d4d5b9febbe1627a6a46cb9
commit 1ca14513c5df74ec3d4d5b9febbe1627a6a46cb9
Merge: 3802255 40249bc
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Jan 21 10:39:27 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 21 10:39:27 2016 -0500
Merge topic 'fix-pkg_search_module-cache' into next
40249bcc FindPkgConfig: set standard variables in the cache
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40249bccdf9c66453433da3608da9cc89cbee675
commit 40249bccdf9c66453433da3608da9cc89cbee675
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Jan 20 14:38:05 2016 -0500
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Jan 21 10:38:30 2016 -0500
FindPkgConfig: set standard variables in the cache
Fixes a regression introduced when the code was simplified to use the
variable queries.
Fixes #15903.
Reported-by: Bernd Lörwald
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 177e7b8..4f50e38 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -382,6 +382,9 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
pkg_get_variable("${_pkg_check_prefix}_PREFIX" ${_pkg_check_modules_pkg} "prefix")
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}}")
+ endforeach ()
if (NOT ${_is_silent})
message(STATUS " Found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}")
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
new file mode 100644
index 0000000..8d8d000
--- /dev/null
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
@@ -0,0 +1,16 @@
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(NCURSES QUIET ncurses)
+
+if (NCURSES_FOUND)
+ foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
+ get_property("${variable}"
+ CACHE "NCURSES_${variable}"
+ PROPERTY TYPE
+ SET)
+ if (NOT ${variable})
+ message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}")
+ endif ()
+ endforeach ()
+else ()
+ message(STATUS "skipping test; ncurses not found")
+endif ()
diff --git a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
index bb04aa2..24089e0 100644
--- a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake
@@ -14,4 +14,5 @@ endif()
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
run_cmake(FindPkgConfig_GET_VARIABLE)
+ run_cmake(FindPkgConfig_cache_variables)
endif ()
-----------------------------------------------------------------------
Summary of changes:
Modules/FindPkgConfig.cmake | 3 +++
.../FindPkgConfig/FindPkgConfig_cache_variables.cmake | 16 ++++++++++++++++
Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake | 1 +
3 files changed, 20 insertions(+)
create mode 100644 Tests/RunCMake/FindPkgConfig/FindPkgConfig_cache_variables.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list