diff options
author | Martin Willers <M.Willers@gmx.net> | 2021-05-02 20:12:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-06 15:40:40 (GMT) |
commit | df0e50d756c4d4187a3b6fa20fc036669ea8c07c (patch) | |
tree | d71b8d31d2147efea51e46b1f40c8ea4aa8c7303 /Source/cmCTest.cxx | |
parent | e0b4a22ca6874a15912eea86cde16f47cb5f9d93 (diff) | |
download | CMake-df0e50d756c4d4187a3b6fa20fc036669ea8c07c.zip CMake-df0e50d756c4d4187a3b6fa20fc036669ea8c07c.tar.gz CMake-df0e50d756c4d4187a3b6fa20fc036669ea8c07c.tar.bz2 |
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.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 79a3925..7534e37 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 } |