Merge topic 'ctest-clicolor'

df0e50d756 CTest: Add env var CLICOLOR to disable color output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6076
This commit is contained in:
Brad King
2021-05-07 13:14:53 +00:00
committed by Kitware Robot

View File

@@ -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
}