summaryrefslogtreecommitdiff
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorMartin Willers <M.Willers@gmx.net>2021-05-02 22:12:51 +0200
committerBrad King <brad.king@kitware.com>2021-05-06 11:40:40 -0400
commitdf0e50d756c4d4187a3b6fa20fc036669ea8c07c (patch)
treed71b8d31d2147efea51e46b1f40c8ea4aa8c7303 /Source/cmCTest.cxx
parente0b4a22ca6874a15912eea86cde16f47cb5f9d93 (diff)
downloadcmake-df0e50d756c4d4187a3b6fa20fc036669ea8c07c.tar.gz
CTest: Add env var CLICOLOR to disable color output
Based on the implementation in Terminal.c:kwsysTerminalStreamIsVT100.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 79a3925509..7534e37f80 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2215,6 +2215,10 @@ bool cmCTest::ColoredOutputSupportedByConsole()
!clicolor_force.empty() && clicolor_force != "0") {
return true;
}
+ std::string clicolor;
+ if (cmSystemTools::GetEnv("CLICOLOR", clicolor) && clicolor == "0") {
+ return false;
+ }
return ConsoleIsNotDumb();
#endif
}