From 4bea5dc11542d8ebe26277ae72799dc4b17c07d8 Mon Sep 17 00:00:00 2001 From: Artem Zuikov Date: Wed, 26 Feb 2020 16:47:46 +0300 Subject: [PATCH] allow to disable colored build (#9380) --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0fd48c194d..c0d4cd5504d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,8 +88,7 @@ endif() include (cmake/sanitize.cmake) - -if (CMAKE_GENERATOR STREQUAL "Ninja") +if (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT DISABLE_COLORED_BUILD) # Turn on colored output. https://github.com/ninja-build/ninja/wiki/FAQ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always")