From e008354b2d31b289b938843c0c6ed8722a1a9cc6 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 15 Mar 2024 15:22:00 +0100 Subject: cmake: Fix error when checkpatch.pl is found but version cannot be extracted --- cmake/FindCheckPatch.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindCheckPatch.cmake b/cmake/FindCheckPatch.cmake index 2772676..3fa1ec8 100644 --- a/cmake/FindCheckPatch.cmake +++ b/cmake/FindCheckPatch.cmake @@ -20,7 +20,7 @@ if(CheckPatch_EXECUTABLE) execute_process(COMMAND ${CheckPatch_EXECUTABLE} --version OUTPUT_VARIABLE CheckPatch_VERBOSE_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) - string(REGEX REPLACE ".*Version:.([0-9]+\\.[0-9]+).*" "\\1" CheckPatch_VERSION ${CheckPatch_VERBOSE_VERSION}) + string(REGEX REPLACE ".*Version:.([0-9]+\\.[0-9]+).*" "\\1" CheckPatch_VERSION "${CheckPatch_VERBOSE_VERSION}") endif(CheckPatch_EXECUTABLE) include(FindPackageHandleStandardArgs) -- cgit v1.2.3-55-g7522