summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18ff147..21865e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -231,8 +231,14 @@ 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 "-g -DDEBUG")
+ ENDIF()
+
SET(KBUILD_COMMAND ${CMAKE_MAKE_PROGRAM} -C ${KERNEL_DIR}
M=${CMAKE_BINARY_DIR} modules
+ EXTRA_CFLAGS=${KERNEL_C_FLAGS}
)
CONFIGURE_FILE(Kbuild.in ${CMAKE_BINARY_DIR}/Kbuild)