summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-05-17 10:42:09 +0200
committerSimon Rettberg2024-05-17 10:42:09 +0200
commit6f13cb7b2b26e511181e7494bda8a106577700e7 (patch)
tree37f0d278f9237f847192e6a31fc2f8b69b1090f6
parent[FUSE] cow: stats.txt -> stats (diff)
downloaddnbd3-6f13cb7b2b26e511181e7494bda8a106577700e7.tar.gz
dnbd3-6f13cb7b2b26e511181e7494bda8a106577700e7.tar.xz
dnbd3-6f13cb7b2b26e511181e7494bda8a106577700e7.zip
[cmake] Quote variable to avoid misleading error if empty
-rw-r--r--cmake/FindKernelHeaders.cmake4
1 files 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})