Merge topic 'ctest-CLICOLOR_FORCE'

074a6a8cf6 CTest: Add env var CLICOLOR_FORCE to force color output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3733
This commit is contained in:
Brad King
2019-08-27 14:54:15 +00:00
committed by Kitware Robot

View File

@@ -2127,6 +2127,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
}