You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2017/04/18 01:43:14 UTC

kudu git commit: Allow forcing color clang diagnostics with an env var

Repository: kudu
Updated Branches:
  refs/heads/master 6ed469079 -> 238249c96


Allow forcing color clang diagnostics with an env var

Change-Id: I3161d6dcc3715693771089351aadb29810c00fcc
Reviewed-on: http://gerrit.cloudera.org:8080/6619
Reviewed-by: Adar Dembo <ad...@cloudera.com>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: 238249c962f9ffed0c691ce5a3f02b652b62b67e
Parents: 6ed4690
Author: Todd Lipcon <to...@apache.org>
Authored: Mon Apr 17 18:17:32 2017 -0700
Committer: Todd Lipcon <to...@apache.org>
Committed: Tue Apr 18 01:39:16 2017 +0000

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


http://git-wip-us.apache.org/repos/asf/kudu/blob/238249c9/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ec5f80..05c719b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -252,9 +252,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.
+  # We also provide a manual override as -DKUDU_FORCE_COLOR_DIAGNOSTICS=1 or
+  # by setting an environment variable of the same name.
   execute_process(COMMAND test -t 2 RESULT_VARIABLE KUDU_IS_TTY)
   if ((NOT "${KUDU_FORCE_COLOR_DIAGNOSTICS}" STREQUAL "") OR
+      (NOT "$ENV{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")