CMakePM: Enable ANSI codes colored output

Qt Creator is able to display colored output for the _Compile Output_
and _General Messages_ panes.

This commit enables CMake and tools to use this functionality.

See https://cmake.org/cmake/help/latest/variable/
CMAKE_COLOR_DIAGNOSTICS.html and http://bixense.com/clicolors/ for more
details.

Change-Id: Ied4058bbd2522750d559b05d585092830ce3a911
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Cristian Adam
2023-10-14 14:35:07 +02:00
parent eab779d13a
commit d7f44cdd24
2 changed files with 4 additions and 0 deletions

View File

@@ -66,6 +66,8 @@ BuildDirParameters::BuildDirParameters(CMakeBuildSystem *buildSystem)
environment.set("ICECC", "no");
environment.set("QTC_RUN", "1");
environment.setFallback("CMAKE_COLOR_DIAGNOSTICS", "1");
environment.setFallback("CLICOLOR_FORCE", "1");
cmakeToolId = CMakeKitAspect::cmakeToolId(k);
}