https://git.reactos.org/?p=reactos.git;a=commitdiff;h=55343f04b084931a20c396b76645f38cad94ea1b
commit 55343f04b084931a20c396b76645f38cad94ea1b Author: Mark Jansen <mark.jan...@reactos.org> AuthorDate: Sat Sep 10 17:27:50 2022 +0200 Commit: Mark Jansen <mark.jan...@reactos.org> CommitDate: Sat Sep 10 17:27:50 2022 +0200 [MSPAINT][EXPLORER][SHELL32] Enable ATL asserts in CMake CORE-17505 In MSVC builds they would not work reliably when enabled in the precompiled header --- base/applications/mspaint/CMakeLists.txt | 4 ++++ base/applications/mspaint/precomp.h | 4 ---- base/shell/explorer/CMakeLists.txt | 4 ++++ base/shell/explorer/precomp.h | 4 ---- dll/win32/shell32/CMakeLists.txt | 4 ++++ dll/win32/shell32/precomp.h | 4 ---- dll/win32/shell32/shellmenu/CMakeLists.txt | 4 ++++ 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/base/applications/mspaint/CMakeLists.txt b/base/applications/mspaint/CMakeLists.txt index 03c71c21359..99215c5295b 100644 --- a/base/applications/mspaint/CMakeLists.txt +++ b/base/applications/mspaint/CMakeLists.txt @@ -2,6 +2,10 @@ project(MSPAINT) add_definitions(-DINITGUID) +if(DBG) + add_definitions(-D_DEBUG=1) # CORE-17505 +endif() + list(APPEND SOURCE dialogs.cpp dib.cpp diff --git a/base/applications/mspaint/precomp.h b/base/applications/mspaint/precomp.h index df5b929bd82..25fd0329d36 100644 --- a/base/applications/mspaint/precomp.h +++ b/base/applications/mspaint/precomp.h @@ -6,10 +6,6 @@ #undef _DEBUG #endif -#if DBG && !defined(_DEBUG) - #define _DEBUG -#endif - #include <stdarg.h> #include <windef.h> diff --git a/base/shell/explorer/CMakeLists.txt b/base/shell/explorer/CMakeLists.txt index 743c10d33b2..222d3a6653a 100644 --- a/base/shell/explorer/CMakeLists.txt +++ b/base/shell/explorer/CMakeLists.txt @@ -1,5 +1,9 @@ PROJECT(SHELL) +if(DBG) + add_definitions(-D_DEBUG=1) # CORE-17505 +endif() + list(APPEND SOURCE appbar.cpp desktop.cpp diff --git a/base/shell/explorer/precomp.h b/base/shell/explorer/precomp.h index 0080f6806e0..efce3c2a233 100644 --- a/base/shell/explorer/precomp.h +++ b/base/shell/explorer/precomp.h @@ -9,10 +9,6 @@ #define WIN7_COMPAT_MODE 1 #endif -#if DBG && !defined(_DEBUG) - #define _DEBUG // CORE-17505 -#endif - #include <stdio.h> #include <tchar.h> diff --git a/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt index 2b1f658bacd..4e1d4f63804 100644 --- a/dll/win32/shell32/CMakeLists.txt +++ b/dll/win32/shell32/CMakeLists.txt @@ -13,6 +13,10 @@ add_definitions( -D_SHELL32_ -D_WINE) +if(DBG) + add_definitions(-D_DEBUG=1) # CORE-17505 +endif() + list(APPEND SOURCE CActiveDesktop.cpp CActiveDesktop.h diff --git a/dll/win32/shell32/precomp.h b/dll/win32/shell32/precomp.h index 983e619d358..9b422353e6c 100644 --- a/dll/win32/shell32/precomp.h +++ b/dll/win32/shell32/precomp.h @@ -1,10 +1,6 @@ #ifndef _PRECOMP_H__ #define _PRECOMP_H__ -#if DBG && !defined(_DEBUG) - #define _DEBUG // CORE-17505 -#endif - #include <stdarg.h> #include <assert.h> diff --git a/dll/win32/shell32/shellmenu/CMakeLists.txt b/dll/win32/shell32/shellmenu/CMakeLists.txt index 01b813afa0f..f3a63b72fef 100644 --- a/dll/win32/shell32/shellmenu/CMakeLists.txt +++ b/dll/win32/shell32/shellmenu/CMakeLists.txt @@ -4,6 +4,10 @@ add_definitions( -DUNICODE -D_UNICODE) +if(DBG) + add_definitions(-D_DEBUG=1) # CORE-17505 +endif() + list(APPEND SOURCE CMenuBand.cpp CMenuDeskBar.cpp