Skip to content

Define DEBUG for MSVC Debug builds - #92

Merged
CanReader merged 1 commit into
stagingfrom
fix/windows-debug-build
Nov 1, 2026
Merged

CanReader merged 1 commit into
stagingfrom
fix/windows-debug-build

Conversation

@CanReader

Copy link
Copy Markdown
Owner

What this changes

Defines DEBUG for Debug builds on MSVC with a $<CONFIG:Debug> generator expression. Visual Studio is a multi-config generator and ignores CMAKE_BUILD_TYPE, so the old check never defined it on Windows. The Linux path is unchanged.

Merge CanReader/SleakEngine#225 first. Windows Debug builds need its Vector.hpp fix to compile. CI here builds against the engine's fix/windows-debug-build branch until then.

Why

Everything behind #ifdef DEBUG was compiled out on Windows, including -world, which quietly fell back to the main menu. The engine's Logger.cpp and VulkanBuffer.cpp use it too.

How it was verified

  • Builds on Windows (MSVC 2022, Debug) with the engine branch
  • Loaded a world (-world HotReloadTest, DX11) and edited flat_shader.hlsl while it ran; it reloaded
  • Builds on Linux. Not rebuilt there; the non-MSVC branch is the same as before.
  • Placed and broke blocks
  • Saved, quit, reloaded, and the world was intact

Only a build flag changed, so placing, breaking and saving weren't exercised. Tested locally on top of main plus #90, not on top of the current staging.

Checklist

  • Shader changes updated all backend variants and the committed .spv (no shader changes)
  • Save format changes bumped WorldMeta::CURRENT_VERSION and handle old worlds (no save changes)
  • Collision changes kept the single-pass MTV resolution intact (no collision changes)
  • New event handlers are unregistered on scene teardown (no new handlers)

@CanReader
CanReader merged commit 8272807 into staging Nov 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant