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, master has been updated
via 4309ed25eee874ee73a715897550e2ea18631f41 (commit)
via 40b95ee8e6ee57ee87b791e831ac3508f77db9a4 (commit)
via b0ff528adc3ec53c06bcead3845f9c2f7251c4d3 (commit)
from 1f29bc4092edf57cfb61882d7d7358db7e53ebe6 (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=4309ed25eee874ee73a715897550e2ea18631f41
commit 4309ed25eee874ee73a715897550e2ea18631f41
Merge: 1f29bc4 40b95ee
Author: Brad King <[email protected]>
AuthorDate: Fri Dec 22 13:42:58 2017 +0000
Commit: Kitware Robot <[email protected]>
CommitDate: Fri Dec 22 08:43:05 2017 -0500
Merge topic 'FindPkgConfig_search_path_fix'
40b95ee8 FindPkgConfig: Fix IMPORTED_TARGET NO...PATH option handling
b0ff528a FindPkgConfig: Make IMPORTED_TARGET test verify NO...PATH properly
Acked-by: Kitware Robot <[email protected]>
Acked-by: Rolf Eike Beer <[email protected]>
Merge-request: !1602
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40b95ee8e6ee57ee87b791e831ac3508f77db9a4
commit 40b95ee8e6ee57ee87b791e831ac3508f77db9a4
Author: Craig Scott <[email protected]>
AuthorDate: Sat Dec 16 21:49:10 2017 +1100
Commit: Craig Scott <[email protected]>
CommitDate: Sat Dec 16 22:40:40 2017 +1100
FindPkgConfig: Fix IMPORTED_TARGET NO...PATH option handling
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index aad3b74..952ca92 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -191,10 +191,10 @@ function(_pkg_create_imp_target _prefix _no_cmake_path
_no_cmake_environment_pat
# set the options that are used as long as the .pc file does not provide a
library
# path to look into
if(_no_cmake_path)
- set(_find_opts "NO_CMAKE_PATH")
+ list(APPEND _find_opts "NO_CMAKE_PATH")
endif()
if(_no_cmake_environment_path)
- string(APPEND _find_opts " NO_CMAKE_ENVIRONMENT_PATH")
+ list(APPEND _find_opts "NO_CMAKE_ENVIRONMENT_PATH")
endif()
unset(_search_paths)
@@ -458,7 +458,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent
_no_cmake_path _no_cma
_pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}"
CFLAGS_OTHER "" --cflags-only-other )
if (_imp_target)
- _pkg_create_imp_target("${_prefix}" _no_cmake_path
_no_cmake_environment_path)
+ _pkg_create_imp_target("${_prefix}" ${_no_cmake_path}
${_no_cmake_environment_path})
endif()
endif()
@@ -590,7 +590,7 @@ macro(pkg_check_modules _prefix _module0)
_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)
+ _pkg_create_imp_target("${_prefix}" ${_no_cmake_path}
${_no_cmake_environment_path})
endif()
endmacro()
@@ -644,7 +644,7 @@ macro(pkg_search_module _prefix _module0)
_pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
elseif (${_prefix}_FOUND AND ${_imp_target})
- _pkg_create_imp_target("${_prefix}" _no_cmake_path
_no_cmake_environment_path)
+ _pkg_create_imp_target("${_prefix}" ${_no_cmake_path}
${_no_cmake_environment_path})
endif()
endmacro()
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0ff528adc3ec53c06bcead3845f9c2f7251c4d3
commit b0ff528adc3ec53c06bcead3845f9c2f7251c4d3
Author: Craig Scott <[email protected]>
AuthorDate: Sat Dec 16 19:21:24 2017 +1100
Commit: Craig Scott <[email protected]>
CommitDate: Sat Dec 16 22:38:56 2017 +1100
FindPkgConfig: Make IMPORTED_TARGET test verify NO...PATH properly
diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
index 00cbb7b..606b1df 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
@@ -24,3 +24,64 @@ if (NCURSES_FOUND)
else ()
message(STATUS "skipping test; ncurses not found")
endif ()
+
+
+# Setup for the remaining package tests below
+set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH)
+set(fakePkgDir ${CMAKE_CURRENT_BINARY_DIR}/pc-fakepackage)
+foreach(i 1 2)
+ set(pname cmakeinternalfakepackage${i})
+ file(WRITE ${fakePkgDir}/lib/lib${pname}.a "")
+ file(WRITE ${fakePkgDir}/lib/${pname}.lib "")
+ file(WRITE ${fakePkgDir}/lib/pkgconfig/${pname}.pc
+"Name: CMakeInternalFakePackage${i}
+Description: Dummy package (${i}) for FindPkgConfig IMPORTED_TARGET test
+Version: 1.2.3
+Libs: -l${pname}
+")
+endforeach()
+
+# Always find the .pc file in the calls further below so that we can test that
+# the import target find_library() calls handle the NO...PATH options correctly
+set(ENV{PKG_CONFIG_PATH} ${fakePkgDir}/lib/pkgconfig)
+
+# Confirm correct behavior of NO_CMAKE_PATH, ensuring we only find the library
+# for the imported target if we have both set CMAKE_PREFIX_PATH and have not
+# given the NO_CMAKE_PATH option
+unset(CMAKE_PREFIX_PATH)
+unset(ENV{CMAKE_PREFIX_PATH})
+pkg_check_modules(FakePackage1 QUIET IMPORTED_TARGET cmakeinternalfakepackage1)
+if (TARGET PkgConfig::FakePackage1)
+ message(FATAL_ERROR "Have import target for fake package 1 with no path
prefix")
+endif()
+
+set(CMAKE_PREFIX_PATH ${fakePkgDir})
+pkg_check_modules(FakePackage1 QUIET IMPORTED_TARGET NO_CMAKE_PATH
cmakeinternalfakepackage1)
+if (TARGET PkgConfig::FakePackage1)
+ message(FATAL_ERROR "Have import target for fake package 1 with ignored
cmake path")
+endif()
+
+pkg_check_modules(FakePackage1 REQUIRED QUIET IMPORTED_TARGET
cmakeinternalfakepackage1)
+if (NOT TARGET PkgConfig::FakePackage1)
+ message(FATAL_ERROR "No import target for fake package 1 with prefix path")
+endif()
+
+# And now do the same for the NO_CMAKE_ENVIRONMENT_PATH -
ENV{CMAKE_PREFIX_PATH}
+# combination
+unset(CMAKE_PREFIX_PATH)
+unset(ENV{CMAKE_PREFIX_PATH})
+pkg_check_modules(FakePackage2 QUIET IMPORTED_TARGET cmakeinternalfakepackage2)
+if (TARGET PkgConfig::FakePackage2)
+ message(FATAL_ERROR "Have import target for fake package 2 with no path
prefix")
+endif()
+
+set(ENV{CMAKE_PREFIX_PATH} ${fakePkgDir})
+pkg_check_modules(FakePackage2 QUIET IMPORTED_TARGET NO_CMAKE_ENVIRONMENT_PATH
cmakeinternalfakepackage2)
+if (TARGET PkgConfig::FakePackage2)
+ message(FATAL_ERROR "Have import target for fake package 2 with ignored
cmake path")
+endif()
+
+pkg_check_modules(FakePackage2 REQUIRED QUIET IMPORTED_TARGET
cmakeinternalfakepackage2)
+if (NOT TARGET PkgConfig::FakePackage2)
+ message(FATAL_ERROR "No import target for fake package 2 with prefix path")
+endif()
-----------------------------------------------------------------------
Summary of changes:
Modules/FindPkgConfig.cmake | 10 ++--
.../FindPkgConfig_IMPORTED_TARGET.cmake | 61 ++++++++++++++++++++
2 files changed, 66 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
_______________________________________________
Cmake-commits mailing list
[email protected]
https://cmake.org/mailman/listinfo/cmake-commits