]> granicus.if.org Git - libevent/commitdiff
Add -fdiagnostics-color=always for Ninja
authorAzat Khuzhin <a3at.mail@gmail.com>
Wed, 17 Oct 2018 08:14:48 +0000 (11:14 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Wed, 17 Oct 2018 08:16:16 +0000 (11:16 +0300)
CMakeLists.txt

index 18766cdee424bfd79e629ea84e24e0f3daa1c4b8..39fce752aecbc79d9f6e036aa12d09e5f68bbbe2 100644 (file)
@@ -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")