Răsfoiți Sursa

Merge topic 'ctest-CLICOLOR_FORCE'

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

Acked-by: Kitware Robot <[email protected]>
Merge-request: !3733
Brad King 6 ani în urmă
părinte
comite
d16402ddc4
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      Source/cmCTest.cxx

+ 5 - 0
Source/cmCTest.cxx

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