mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-26 20:53:31 +01:00
Allow ANSI colour to be compiled on Windows
This enables building with `CATCH_CONFIG_COLOUR_ANSI` on Windows. The changes are taken from v3 commit 0e176c318b
.
This commit is contained in:
parent
182c910b4b
commit
20ace55034
@ -121,7 +121,10 @@ namespace {
|
|||||||
|
|
||||||
#elif defined( CATCH_CONFIG_COLOUR_ANSI ) //////////////////////////////////////
|
#elif defined( CATCH_CONFIG_COLOUR_ANSI ) //////////////////////////////////////
|
||||||
|
|
||||||
#include <unistd.h>
|
#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC )
|
||||||
|
# define CATCH_INTERNAL_HAS_ISATTY
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
namespace {
|
namespace {
|
||||||
@ -170,7 +173,8 @@ namespace {
|
|||||||
#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)
|
#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)
|
||||||
!isDebuggerActive() &&
|
!isDebuggerActive() &&
|
||||||
#endif
|
#endif
|
||||||
#if !(defined(__DJGPP__) && defined(__STRICT_ANSI__))
|
#if defined( CATCH_INTERNAL_HAS_ISATTY ) && \
|
||||||
|
!( defined( __DJGPP__ ) && defined( __STRICT_ANSI__ ) )
|
||||||
isatty(STDOUT_FILENO)
|
isatty(STDOUT_FILENO)
|
||||||
#else
|
#else
|
||||||
false
|
false
|
||||||
|
Loading…
Reference in New Issue
Block a user