From d96fca2018e326c72aceb0e1320fb774c619ca2d Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Sun, 14 Jan 2024 13:39:05 -0500 Subject: [PATCH] Handle possibility that cmake version isn't determined correctly --- r/tools/nixlibs.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R index 87ccfe1a927f7..4f909b0e88cfe 100644 --- a/r/tools/nixlibs.R +++ b/r/tools/nixlibs.R @@ -674,7 +674,12 @@ find_cmake <- function(paths = c( } else { # Keep trying lg("Not using cmake found at %s", path, .indent = "****") - lg("Version >= %s required; found %s", version_required, found_version,.indent = "*****") + if (found_version > 0) { + lg("Version >= %s required; found %s", version_required, found_version, .indent = "*****") + } else { + # If cmake_version() couldn't determine version, it returns 0 + lg("Could not determine version; >= %s required", version_required, .indent = "*****") + } } } }