summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAzat Khuzhin <a3at.mail@gmail.com>2018-10-17 11:14:48 +0300
committerAzat Khuzhin <a3at.mail@gmail.com>2018-10-17 11:16:16 +0300
commitcec4a37120b7fe07525018e4415db8adcfba9299 (patch)
tree1950e01a0f400e75cb13bb762662c43c0311fcfb /CMakeLists.txt
parent8483c5351abdd18766232de8431290165717bd57 (diff)
downloadlibevent-cec4a37120b7fe07525018e4415db8adcfba9299.tar.gz
Add -fdiagnostics-color=always for Ninja
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
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")