You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2016/07/01 01:22:53 UTC

incubator-kudu git commit: Allow to force-override color diagnostics

Repository: incubator-kudu
Updated Branches:
  refs/heads/master 88acae32a -> 3e3917344


Allow to force-override color diagnostics

Change-Id: I7c19651df6d74753b0d4e8ac85ff98326dee7b10
Reviewed-on: http://gerrit.cloudera.org:8080/3509
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Mike Percy <mp...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/3e391734
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/3e391734
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/3e391734

Branch: refs/heads/master
Commit: 3e3917344f4cd8cede7451aebbd459d46055315f
Parents: 88acae3
Author: Mike Percy <mp...@apache.org>
Authored: Sun Jun 26 15:35:21 2016 -0700
Committer: Mike Percy <mp...@apache.org>
Committed: Fri Jul 1 01:22:41 2016 +0000

----------------------------------------------------------------------
 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/3e391734/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c99318..654132c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -226,8 +226,11 @@ if ("${COMPILER_FAMILY}" STREQUAL "clang")
   #
   # This test is imperfect because 'cmake' and 'make' can be run independently
   # (with different terminal options), and we're testing during the former.
+  #
+  # We also provide a manual override as -DKUDU_FORCE_COLOR_DIAGNOSTICS=1.
   execute_process(COMMAND test -t 2 RESULT_VARIABLE KUDU_IS_TTY)
-  if ((${KUDU_IS_TTY} EQUAL 0) AND (NOT ("$ENV{TERM}" STREQUAL "dumb")))
+  if ((NOT "${KUDU_FORCE_COLOR_DIAGNOSTICS}" STREQUAL "") OR
+      ((${KUDU_IS_TTY} EQUAL 0) AND (NOT ("$ENV{TERM}" STREQUAL "dumb"))))
     message("Running in a controlling terminal")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
   else()