From 7f2b11ee4f62f4135482e2434ee27331a76d9580 Mon Sep 17 00:00:00 2001 From: Mateo de Mayo <mateo.demayo@collabora.com> Date: Tue, 18 Oct 2022 10:16:02 -0300 Subject: [PATCH] build: Enable colored compiler errors by default Noticeable when using Ninja as generator --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd235c6dc..ad5ed9fc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -429,9 +429,9 @@ if(CMAKE_INTERPROCEDURAL_OPTIMIZATION) endif() # Make sure we have pretty colours -option(FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE) +option(DISABLE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF) -if(FORCE_COLORED_OUTPUT) +if(NOT DISABLE_COLORED_OUTPUT) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") add_compile_options(-fdiagnostics-color=always) elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")