Skip to content

Commit 5a68edb

Browse files
committed
build: Minor debugging fixes to dependency_utils
* Have build_dependency_with_cmake print the error message if the git repo can't be cloned. * Fix mis-quoted env variable in status message. * Improve gramma of status message. Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent 7355728 commit 5a68edb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/cmake/dependency_utils.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function (print_package_notfound_report)
100100
message (STATUS "${ColorBoldYellow}=========================================================================${ColorReset}")
101101
message (STATUS)
102102
if (CFP_EXTERNAL_BUILD_DEPS_FOUND)
103-
message (STATUS "${ColorBoldWhite}The following dependencies found externally:${ColorReset}")
103+
message (STATUS "${ColorBoldWhite}The following dependencies were found externally:${ColorReset}")
104104
list (SORT CFP_EXTERNAL_BUILD_DEPS_FOUND CASE INSENSITIVE)
105105
list (REMOVE_DUPLICATES CFP_EXTERNAL_BUILD_DEPS_FOUND)
106106
foreach (_pkg IN LISTS CFP_EXTERNAL_BUILD_DEPS_FOUND)
@@ -161,8 +161,8 @@ function (handle_package_notfound pkgname required)
161161
message (STATUS "${ColorRed}${pkgname} library not found ${ColorReset}")
162162
if (${pkgname}_ROOT)
163163
message (STATUS " ${pkgname}_ROOT was: ${${pkgname}_ROOT}")
164-
elseif ($ENV{${pkgname}_ROOT})
165-
message (STATUS " ENV ${pkgname}_ROOT was: ${${pkgname}_ROOT}")
164+
elseif (DEFINED ENV{${pkgname}_ROOT})
165+
message (STATUS " ENV ${pkgname}_ROOT was: $ENV{${pkgname}_ROOT}")
166166
else ()
167167
message (STATUS " Try setting ${pkgname}_ROOT ?")
168168
endif ()
@@ -654,7 +654,7 @@ macro (build_dependency_with_cmake pkgname)
654654
${${pkgname}_GIT_CLONE_ARGS}
655655
${_pkg_exec_quiet})
656656
if (NOT IS_DIRECTORY ${${pkgname}_LOCAL_SOURCE_DIR})
657-
message (FATAL_ERROR "Could not download ${_pkg_GIT_REPOSITORY}")
657+
message (FATAL_ERROR "Could not download ${_pkg_GIT_REPOSITORY}: ${${pkgname}_clone_errors}")
658658
endif ()
659659
endif ()
660660
# Checkout and verify the source against the expected commit hash to

0 commit comments

Comments
 (0)