mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-25 10:18:34 -06:00
CTest: Add env var CLICOLOR_FORCE to force color output
Base impl on `Source/kwsys/Terminal.c:kwsysTerminalStreamIsVT100`. This enables pipes/logs with colors.
This commit is contained in:
@@ -2125,6 +2125,11 @@ bool cmCTest::ColoredOutputSupportedByConsole()
|
||||
return false;
|
||||
#else
|
||||
// On UNIX we need a non-dumb tty.
|
||||
std::string clicolor_force;
|
||||
if (cmSystemTools::GetEnv("CLICOLOR_FORCE", clicolor_force) &&
|
||||
!clicolor_force.empty() && clicolor_force != "0") {
|
||||
return true;
|
||||
}
|
||||
return ConsoleIsNotDumb();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user