From: Azat Khuzhin Date: Wed, 17 Oct 2018 08:14:48 +0000 (+0300) Subject: Add -fdiagnostics-color=always for Ninja X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cec4a37120b7fe07525018e4415db8adcfba9299;p=libevent Add -fdiagnostics-color=always for Ninja --- 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")