From af0abaaccbee8042732d4fc84a5fde0f4d9ffffe Mon Sep 17 00:00:00 2001 From: Axel Naumann <Axel.Naumann@cern.ch> Date: Wed, 24 Apr 2013 19:49:12 +0000 Subject: [PATCH] No color if not a terminal; see clang/lib/Driver/Tools.cpp:3200 git-svn-id: http://root.cern.ch/svn/root/trunk@49329 27541ba8-7e3a-0410-8455-c3a389f83636 --- interpreter/cling/lib/Interpreter/CIFactory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interpreter/cling/lib/Interpreter/CIFactory.cpp b/interpreter/cling/lib/Interpreter/CIFactory.cpp index 644a933e638..fc056b50e78 100644 --- a/interpreter/cling/lib/Interpreter/CIFactory.cpp +++ b/interpreter/cling/lib/Interpreter/CIFactory.cpp @@ -25,6 +25,7 @@ #include "llvm/Support/TargetSelect.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" +#include "llvm/Support/Process.h" #include <ctime> @@ -114,7 +115,7 @@ namespace cling { //______________________________________ DiagnosticOptions* DefaultDiagnosticOptions = new DiagnosticOptions(); - DefaultDiagnosticOptions->ShowColors = 1; + DefaultDiagnosticOptions->ShowColors = llvm::sys::Process::StandardErrHasColors() ? 1 : 0; TextDiagnosticPrinter* DiagnosticPrinter = new TextDiagnosticPrinter(llvm::errs(), DefaultDiagnosticOptions); llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> DiagIDs(new DiagnosticIDs()); -- GitLab