Don't generate colorized output escapes when stderr isn't a TTY.

When piping to a pile, more/less, etc, this is generally undesirable.

This behavior can be overridden with the --colorized-output command-line
flag.
This commit is contained in:
Matt Pharr
2012-06-04 09:20:57 -07:00
parent 6118643232
commit 1397dbdabc
4 changed files with 15 additions and 0 deletions

4
ispc.h
View File

@@ -407,6 +407,10 @@ struct Globals {
/** Indicates whether all printed output should be surpressed. */
bool quiet;
/** Always use ANSI escape sequences to colorize warning and error
messages, even if piping output to a file, etc. */
bool forceColoredOutput;
/** Indicates whether calls should be emitted in the program to an
externally-defined program instrumentation function. (See the
"Instrumenting your ispc programs" section in the user's