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")