From 6f13cb7b2b26e511181e7494bda8a106577700e7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 17 May 2024 10:42:09 +0200 Subject: [cmake] Quote variable to avoid misleading error if empty --- cmake/FindKernelHeaders.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/FindKernelHeaders.cmake b/cmake/FindKernelHeaders.cmake index c04243e..ce71aa8 100644 --- a/cmake/FindKernelHeaders.cmake +++ b/cmake/FindKernelHeaders.cmake @@ -31,10 +31,10 @@ find_path(KernelHeaders_INCLUDE_DIR # get Linux kernel headers version file(READ "${KERNEL_BUILD_DIR}/include/generated/utsrelease.h" tmpvar) -string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" KernelHeaders_VERSION ${tmpvar}) +string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" KernelHeaders_VERSION "${tmpvar}") if("${KernelHeaders_VERSION}" EQUAL "") file(READ "${KERNEL_BUILD_DIR}/include/config/kernel.release" tmpvar) - string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" KernelHeaders_VERSION ${tmpvar}) + string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" KernelHeaders_VERSION "${tmpvar}") endif() if("${KernelHeaders_VERSION}" EQUAL "") string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" KernelHeaders_VERSION ${KernelHeaders_INCLUDE_DIR}) -- cgit v1.2.3-55-g7522