diff --git a/src/plugins/cmakeprojectmanager/builddirparameters.cpp b/src/plugins/cmakeprojectmanager/builddirparameters.cpp index 0785ca8d959..9f1a03bdc1e 100644 --- a/src/plugins/cmakeprojectmanager/builddirparameters.cpp +++ b/src/plugins/cmakeprojectmanager/builddirparameters.cpp @@ -112,7 +112,6 @@ 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); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 1c5e78980ab..1bc3794e560 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -1187,6 +1187,9 @@ static CommandLine defaultInitialCMakeCommand( } } + // CMake should output colors by default + cmd.addArg("-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON"); + cmd.addArgs(CMakeConfigurationKitAspect::toArgumentsList(k)); cmd.addArgs(CMakeConfigurationKitAspect::additionalConfiguration(k), CommandLine::Raw);