https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b6d7571ebba5997ba6fb0ef18da3eee0e57da500

commit b6d7571ebba5997ba6fb0ef18da3eee0e57da500
Author:     Hervé Poussineau <hpous...@reactos.org>
AuthorDate: Sat Jun 25 19:01:08 2022 +0200
Commit:     Hervé Poussineau <hpous...@reactos.org>
CommitDate: Sat Sep 10 23:16:27 2022 +0200

    [CMAKE] Set KDBG define only where required (fastfat, win32k, ntoskrnl)
---
 CMakeLists.txt                             | 4 ----
 drivers/filesystems/fastfat/CMakeLists.txt | 3 +++
 ntoskrnl/ntos.cmake                        | 4 ++++
 win32ss/CMakeLists.txt                     | 1 +
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1e95dfd5b5..3b6cfae73a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -217,10 +217,6 @@ Enable this if the module uses typeid or dynamic_cast. You 
will probably need to
         add_definitions(-DDBG=0)
     endif()
 
-    if(KDBG)
-        add_definitions(-DKDBG)
-    endif()
-
     if(ENABLE_CCACHE)
         message(WARNING "-- Disabling precompiled headers support (ccache).")
         option(PCH "Whether to use precompiled headers" OFF)
diff --git a/drivers/filesystems/fastfat/CMakeLists.txt 
b/drivers/filesystems/fastfat/CMakeLists.txt
index 123845f813d..4eb78bf29a6 100644
--- a/drivers/filesystems/fastfat/CMakeLists.txt
+++ b/drivers/filesystems/fastfat/CMakeLists.txt
@@ -24,6 +24,9 @@ list(APPEND SOURCE
     volume.c
     vfat.h)
 
+if(KDBG)
+    add_definitions(-DKDBG)
+endif()
 add_library(fastfat MODULE ${SOURCE} vfatfs.rc)
 set_module_type(fastfat kernelmodedriver)
 target_link_libraries(fastfat ${PSEH_LIB})
diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake
index 0c666cfeb8f..38af3b2b81b 100644
--- a/ntoskrnl/ntos.cmake
+++ b/ntoskrnl/ntos.cmake
@@ -378,6 +378,10 @@ elseif(ARCH STREQUAL "arm")
 endif()
 
 if(NOT _WINKD_)
+    if(KDBG)
+        add_definitions(-DKDBG)
+    endif()
+
     if(ARCH STREQUAL "i386")
         list(APPEND SOURCE
             ${REACTOS_SOURCE_DIR}/ntoskrnl/kd/i386/kdbg.c)
diff --git a/win32ss/CMakeLists.txt b/win32ss/CMakeLists.txt
index 16026d6275e..f771bdd3771 100644
--- a/win32ss/CMakeLists.txt
+++ b/win32ss/CMakeLists.txt
@@ -226,6 +226,7 @@ list(APPEND SOURCE
 endif()
 
 if(KDBG)
+    add_definitions(-DKDBG)
     list(APPEND SOURCE gdi/ntgdi/gdikdbgext.c)
 endif()
 

Reply via email to