diff options
| author | Silent | 2025-09-17 13:23:24 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2025-09-17 20:25:26 +0200 |
| commit | dc3a4ea41a78c643fbfa07b1cb456738c9e25ef6 (patch) | |
| tree | 1f96a64a10a70c51c10e1393dc7ff914dc163081 /src/catch2/internal | |
| parent | cd93d202e047f91370b922f09db2e658653088de (diff) | |
| download | catch3-dc3a4ea41a78c643fbfa07b1cb456738c9e25ef6.tar.gz | |
Fix non-desktop Windows platforms not defining CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32 correctly
Fixes building on non-desktop GDK platforms.
Diffstat (limited to 'src/catch2/internal')
| -rw-r--r-- | src/catch2/internal/catch_compiler_capabilities.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp index 4cf1d652..983fb63b 100644 --- a/src/catch2/internal/catch_compiler_capabilities.hpp +++ b/src/catch2/internal/catch_compiler_capabilities.hpp @@ -220,13 +220,17 @@ # endif // Universal Windows platform does not support SEH -// Or console colours (or console at all...) -# if defined(CATCH_PLATFORM_WINDOWS_UWP) -# define CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32 -# else +# if !defined(CATCH_PLATFORM_WINDOWS_UWP) # define CATCH_INTERNAL_CONFIG_WINDOWS_SEH # endif +// Only some Windows platform families support the console +# if defined(WINAPI_FAMILY_PARTITION) +# if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) +# define CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32 +# endif +# endif + // MSVC traditional preprocessor needs some workaround for __VA_ARGS__ // _MSVC_TRADITIONAL == 0 means new conformant preprocessor // _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor |