diff options
Diffstat (limited to 'Source/kwsys/Terminal.c')
-rw-r--r-- | Source/kwsys/Terminal.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c index 4d1b46c871..20bb5fe6d0 100644 --- a/Source/kwsys/Terminal.c +++ b/Source/kwsys/Terminal.c @@ -10,7 +10,7 @@ #endif /* Configure support for this platform. */ -#if defined(_WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) # define KWSYS_TERMINAL_SUPPORT_CONSOLE #endif #if !defined(_WIN32) @@ -173,6 +173,14 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100, } } + /* Disable color according to http://bixense.com/clicolors/ convention. */ + { + const char* clicolor = getenv("CLICOLOR"); + if (clicolor && strcmp(clicolor, "0") == 0) { + return 0; + } + } + /* GNU make 4.1+ may tell us that its output is destined for a TTY. */ { const char* termout = getenv("MAKE_TERMOUT"); |