Title: [182230] trunk
Revision
182230
Author
y...@igalia.com
Date
2015-04-01 04:15:01 -0700 (Wed, 01 Apr 2015)

Log Message

Use colored diagnostics when building with cmake + ninja + clang
https://bugs.webkit.org/show_bug.cgi?id=143297

Reviewed by Žan Doberšek.

Because that ninja sets subprocess stdout/stderr to a pipe, clang
disables colored output.
This patch forces clang to use colored diagnostics when we are using
the ninja.

* Source/cmake/OptionsCommon.cmake:

Modified Paths

Diff

Modified: trunk/ChangeLog (182229 => 182230)


--- trunk/ChangeLog	2015-04-01 10:46:19 UTC (rev 182229)
+++ trunk/ChangeLog	2015-04-01 11:15:01 UTC (rev 182230)
@@ -1,3 +1,17 @@
+2015-04-01  Gwang Yoon Hwang  <y...@igalia.com>
+
+        Use colored diagnostics when building with cmake + ninja + clang
+        https://bugs.webkit.org/show_bug.cgi?id=143297
+
+        Reviewed by Žan Doberšek.
+
+        Because that ninja sets subprocess stdout/stderr to a pipe, clang
+        disables colored output.
+        This patch forces clang to use colored diagnostics when we are using
+        the ninja.
+
+        * Source/cmake/OptionsCommon.cmake:
+
 2015-03-29  Gyuyoung Kim  <gyuyoung....@samsung.com>
 
         [CMake] Update old CMakeList.txt in gtest

Modified: trunk/Source/cmake/OptionsCommon.cmake (182229 => 182230)


--- trunk/Source/cmake/OptionsCommon.cmake	2015-04-01 10:46:19 UTC (rev 182229)
+++ trunk/Source/cmake/OptionsCommon.cmake	2015-04-01 11:15:01 UTC (rev 182230)
@@ -30,6 +30,11 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 endif ()
 
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND CMAKE_GENERATOR STREQUAL "Ninja")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
+endif ()
+
 # Detect Cortex-A53 core if CPU is ARM64 and OS is Linux.
 # Query /proc/cpuinfo for each available core and check reported CPU part number: 0xd03 signals Cortex-A53.
 # (see Main ID Register in ARM Cortex-A53 MPCore Processor Technical Reference Manual)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to