summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-10-19 13:16:32 (GMT)
committerBrad King <brad.king@kitware.com>2015-10-19 13:16:32 (GMT)
commitc6d75294b2827a7f24baed4814046d9d0bd6a61d (patch)
treedb1b41d0623fa1f8c7f602c7b575c8f61ceb5413 /Source/kwsys
parentbf7d21b0cd7bfad2469a4ae337056a754e6b0fe5 (diff)
parent9c6a7203fb0c6034771011a8ac58ae447726b919 (diff)
downloadCMake-c6d75294b2827a7f24baed4814046d9d0bd6a61d.zip
CMake-c6d75294b2827a7f24baed4814046d9d0bd6a61d.tar.gz
CMake-c6d75294b2827a7f24baed4814046d9d0bd6a61d.tar.bz2
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/Terminal.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c
index d13f79a..a8abb6c 100644
--- a/Source/kwsys/Terminal.c
+++ b/Source/kwsys/Terminal.c
@@ -184,14 +184,25 @@ static const char* kwsysTerminalVT100Names[] =
static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
int default_tty)
{
+ /* Force color according to http://bixense.com/clicolors/ convention. */
+ {
+ const char* clicolor_force = getenv("CLICOLOR_FORCE");
+ if (clicolor_force && *clicolor_force && strcmp(clicolor_force, "0") != 0)
+ {
+ return 1;
+ }
+ }
+
/* If running inside emacs the terminal is not VT100. Some emacs
seem to claim the TERM is xterm even though they do not support
VT100 escapes. */
+ {
const char* emacs = getenv("EMACS");
if(emacs && *emacs == 't')
{
return 0;
}
+ }
/* Check for a valid terminal. */
if(!default_vt100)