diff options
author | Brad King <brad.king@kitware.com> | 2023-10-04 15:19:27 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-10-04 15:19:36 (GMT) |
commit | a48363782131c3ab45c4b40773ff25002e6c3adb (patch) | |
tree | e98a80ae4934b768639aa1f1297ce8f4c0589197 /Modules | |
parent | 1f00b0e2300299802bd01ba24271e901a428605d (diff) | |
parent | 4c96b31e4bd8f37658291a1cda2996df101f6aa9 (diff) | |
download | CMake-a48363782131c3ab45c4b40773ff25002e6c3adb.zip CMake-a48363782131c3ab45c4b40773ff25002e6c3adb.tar.gz CMake-a48363782131c3ab45c4b40773ff25002e6c3adb.tar.bz2 |
Merge topic 'FindPkgConfig-error' into release-3.28
4c96b31e4b FindPkgConfig: Report not-found package names in fatal error message
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8856
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindPkgConfig.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 5466e79..27d25fb 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -555,7 +555,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma endif() set(_pkg_check_modules_packages) - set(_pkg_check_modules_failed) + set(_pkg_check_modules_failed "") _pkg_set_path_internal() @@ -609,14 +609,14 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma message(STATUS " ${_pkgconfig_error}") endif() - set(_pkg_check_modules_failed 1) + string(APPEND _pkg_check_modules_failed " - ${_pkg_check_modules_pkg}\n") endif() endforeach() if(_pkg_check_modules_failed) # fail when requested if (${_is_required}) - message(FATAL_ERROR "A required package was not found") + message(FATAL_ERROR "The following required packages were not found:\n${_pkg_check_modules_failed}") endif () else() # when we are here, we checked whether requested modules |