summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/server/detect.py3
-rw-r--r--platform/x11/detect.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/platform/server/detect.py b/platform/server/detect.py
index 24b36d3188..e2d64c6545 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -40,6 +40,9 @@ def configure(env):
env["CC"]="clang"
env["CXX"]="clang++"
env["LD"]="clang++"
+ if (env["colored"]=="yes"):
+ if sys.stdout.isatty():
+ env.Append(CXXFLAGS=["-fcolor-diagnostics"])
is64=sys.maxsize > 2**32
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 621a0c66a0..2b38099a74 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -81,6 +81,9 @@ def configure(env):
env.extra_suffix=".llvms"
else:
env.extra_suffix=".llvm"
+ if (env["colored"]=="yes"):
+ if sys.stdout.isatty():
+ env.Append(CXXFLAGS=["-fcolor-diagnostics"])