Skip to content
Snippets Groups Projects
Commit af0abaac authored by Axel Naumann's avatar Axel Naumann
Browse files

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
parent ce31e0e7
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "llvm/Support/TargetSelect.h" #include "llvm/Support/TargetSelect.h"
#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h" #include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include <ctime> #include <ctime>
...@@ -114,7 +115,7 @@ namespace cling { ...@@ -114,7 +115,7 @@ namespace cling {
//______________________________________ //______________________________________
DiagnosticOptions* DefaultDiagnosticOptions = new DiagnosticOptions(); DiagnosticOptions* DefaultDiagnosticOptions = new DiagnosticOptions();
DefaultDiagnosticOptions->ShowColors = 1; DefaultDiagnosticOptions->ShowColors = llvm::sys::Process::StandardErrHasColors() ? 1 : 0;
TextDiagnosticPrinter* DiagnosticPrinter TextDiagnosticPrinter* DiagnosticPrinter
= new TextDiagnosticPrinter(llvm::errs(), DefaultDiagnosticOptions); = new TextDiagnosticPrinter(llvm::errs(), DefaultDiagnosticOptions);
llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> DiagIDs(new DiagnosticIDs()); llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> DiagIDs(new DiagnosticIDs());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment