Fix compiling on non-desktop GDK platforms#3029
Merged
horenmar merged 1 commit intocatchorg:develfrom Sep 17, 2025
Merged
Conversation
…NO_COLOUR_WIN32 correctly Fixes building on non-desktop GDK platforms.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #3029 +/- ##
==========================================
+ Coverage 90.93% 90.97% +0.03%
==========================================
Files 201 201
Lines 8681 8681
==========================================
+ Hits 7894 7897 +3
+ Misses 787 784 -3 🚀 New features to boost your workflow:
|
Member
|
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When building on non-desktop GDK platforms, I'd encounter compile failures regarding
CONSOLE_SCREEN_BUFFER_INFOand other console-related WinAPI symbols. Those are defined only for some family partitions, and they were not correctly covered by the currentCATCH_PLATFORM_WINDOWS_UWPgate-off.In this PR, I modified the code defining
CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32to use the correct Windows family partition checks (when applicable), identical to the checks performed insideConsoleApi2.h. With this change, I can build Catch2 on all platforms supported by GDK.GitHub Issues
N/A, stumbled upon this issue in production.