summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorManuel Bentele2020-08-28 14:50:51 +0200
committerManuel Bentele2020-08-28 14:50:51 +0200
commit042b7ca9932f05ed7c69efc7b15fa58e42c6eb3c (patch)
tree5957cd5d532ce311f85c2bb2d7a9a861da18cd35 /CMakeLists.txt
parent[KERNEL] convert to blk-mq and ktime (diff)
downloaddnbd3-042b7ca9932f05ed7c69efc7b15fa58e42c6eb3c.tar.gz
dnbd3-042b7ca9932f05ed7c69efc7b15fa58e42c6eb3c.tar.xz
dnbd3-042b7ca9932f05ed7c69efc7b15fa58e42c6eb3c.zip
[KERNEL] convert debug messages and clean up code
This change converts all debug messages to support the Linux kernel's dynamic debug feature. Debug messages can be enabled or disabled by the debug feature if the - kernel module is built in debug mode (EXTRA_CFLAGS=-g -DDEBUG) - Linux kernel supports dynamic debug (CONFIG_DYNAMIC_DEBUG is set) This patch removes outdated kernel compatibility macros (used for Linux kernels in version 4.x) and cleans up the kernel module's code.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21865e5..89a44eb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -231,8 +231,8 @@ IF(BUILD_KERNEL_MODULE)
SET(KERNEL_DIR "/lib/modules/${CMAKE_SYSTEM_VERSION}/build")
ENDIF()
- SET(KERNEL_C_FLAGS "")
- IF(KERNEL_C_FLAGS MATCHES Debug)
+ SET(KERNEL_C_FLAGS "" CACHE STRING "Additional C flags to be used for building the kernel module")
+ IF(CMAKE_BUILD_TYPE MATCHES Debug)
SET(KERNEL_C_FLAGS "-g -DDEBUG")
ENDIF()