CMakeLists: add DEBUGGER_WAIT_DIALOG compiler definition to Debug builds of libEGL and libvk_swiftshader

This matches what's in the manually managed vcxproj for the two modules.
We add these for non-MSVC as well so we might eventually add support
to those platforms. Note that these are guarded with #ifdef _WIN32
already, so there's no danger of this breaking non-MSVC builds.

Change-Id: Ie855eb4aa1006607fdf8799ccde72305c53f3508
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30028
Presubmit-Ready: Antonio Maiorano <amaiorano@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Antonio Maiorano <amaiorano@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e11f983..0b0b385 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1698,7 +1698,7 @@
         INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}"
         FOLDER "OpenGL"
         COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
-        COMPILE_DEFINITIONS "EGL_EGLEXT_PROTOTYPES; EGLAPI=; NO_SANITIZE_FUNCTION=;"
+        COMPILE_DEFINITIONS "EGL_EGLEXT_PROTOTYPES; EGLAPI=; NO_SANITIZE_FUNCTION=;$<$<CONFIG:Debug>:DEBUGGER_WAIT_DIALOG>"
         PREFIX ""
     )
     if (ANDROID)
@@ -1776,7 +1776,7 @@
         INCLUDE_DIRECTORIES "${VULKAN_INCLUDE_DIR}"
         FOLDER "Vulkan"
         COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
-        COMPILE_DEFINITIONS "NO_SANITIZE_FUNCTION=;"
+        COMPILE_DEFINITIONS "NO_SANITIZE_FUNCTION=;$<$<CONFIG:Debug>:DEBUGGER_WAIT_DIALOG>"
         PREFIX ""
     )
     set_shared_library_export_map(libvk_swiftshader ${SOURCE_DIR}/Vulkan)