summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeGenericSystem.cmake
diff options
context:
space:
mode:
authorSemyon Kolton <semyon.kolton@jetbrains.com>2022-02-15 15:17:24 (GMT)
committerBrad King <brad.king@kitware.com>2022-03-08 21:37:08 (GMT)
commit884d9de8b7d7201a4461711335ac10aae743777d (patch)
treeaa19ae6256be7d17ed296dfad89bbece1f9e1770 /Modules/CMakeGenericSystem.cmake
parent2ac3db2d42482c70631d8be5badc44e61298afd5 (diff)
downloadCMake-884d9de8b7d7201a4461711335ac10aae743777d.zip
CMake-884d9de8b7d7201a4461711335ac10aae743777d.tar.gz
CMake-884d9de8b7d7201a4461711335ac10aae743777d.tar.bz2
color: Introduce CMAKE_COLOR_DIAGNOSTICS variable
Add a variable to control both makefile color messages and compiler color diagnostics. Fixes: #15502
Diffstat (limited to 'Modules/CMakeGenericSystem.cmake')
-rw-r--r--Modules/CMakeGenericSystem.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 9ae68c4..e54a028 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -48,10 +48,11 @@ set (CMAKE_SKIP_INSTALL_RPATH "NO" CACHE BOOL
set(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
if(CMAKE_GENERATOR MATCHES "Make")
- set(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
- "Enable/Disable color output during build."
- )
+ if(NOT DEFINED CMAKE_COLOR_DIAGNOSTICS)
+ set(CMAKE_COLOR_MAKEFILE ON CACHE BOOL "Enable/Disable color output during build.")
+ endif()
mark_as_advanced(CMAKE_COLOR_MAKEFILE)
+
if(DEFINED CMAKE_RULE_MESSAGES)
set_property(GLOBAL PROPERTY RULE_MESSAGES ${CMAKE_RULE_MESSAGES})
endif()