diff options
author | Simon Rettberg | 2021-10-19 14:51:09 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-10-19 14:51:09 +0200 |
commit | 1e9597534a109e3dbce730287c5b45e1b6782c93 (patch) | |
tree | f496e679e1aea482b470311053e0418355fc59b0 /cmake | |
parent | [BUILD] Change CMake search for the existence of Linux headers (diff) | |
download | dnbd3-1e9597534a109e3dbce730287c5b45e1b6782c93.tar.gz dnbd3-1e9597534a109e3dbce730287c5b45e1b6782c93.tar.xz dnbd3-1e9597534a109e3dbce730287c5b45e1b6782c93.zip |
[BUILD] CheckPatch: Quote variable to avoid error if empty
The variable is most likely empty if the according kernel headers
directory was deleted. However, as it currently stands, cmake is
complaining about too few arguments, which isn't really helpful to the
user.
Instead, quote the variable to make cmake finish, and have the actual
compile process of the kernel module fail, which will yield a much more
helpful error message.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindCheckPatch.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
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) |