From cec4a37120b7fe07525018e4415db8adcfba9299 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 17 Oct 2018 11:14:48 +0300 Subject: [PATCH] Add -fdiagnostics-color=always for Ninja --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 18766cde..39fce752 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,11 @@ if (EVENT__ENABLE_VERBOSE_DEBUG) add_definitions(-DUSE_DEBUG=1) endif() +# make it colorful under ninja-build +if ("${CMAKE_GENERATOR}" STREQUAL "Ninja") + add_compiler_flags(-fdiagnostics-color=always) +endif() + # Setup compiler flags for coverage. if (EVENT__COVERAGE) if (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "debug") -- 2.40.0