diff options
author | Błażej Szczygieł <spaz16@wp.pl> | 2016-10-17 21:04:13 +0200 |
---|---|---|
committer | Błażej Szczygieł <spaz16@wp.pl> | 2016-10-17 22:40:14 +0200 |
commit | 2bf4553fe056c1fab5367dfae62426d3c7cf8168 (patch) | |
tree | 105c7de072427ffad00511abb8a82d3b3ac7c4c5 | |
parent | e96c49f849fd9c5e41c8284c7122ec94909badac (diff) |
SCons: Use colored output if available, change "colored"->"verbose"
-rw-r--r-- | SConstruct | 8 | ||||
-rwxr-xr-x | methods.py | 2 | ||||
-rw-r--r-- | platform/osx/detect.py | 3 | ||||
-rw-r--r-- | platform/server/detect.py | 3 | ||||
-rw-r--r-- | platform/x11/detect.py | 4 |
5 files changed, 6 insertions, 14 deletions
diff --git a/SConstruct b/SConstruct index 7b07ee8857..361d20e346 100644 --- a/SConstruct +++ b/SConstruct @@ -65,6 +65,8 @@ elif (os.name=="nt"): custom_tools=['mingw'] env_base=Environment(tools=custom_tools); +if 'TERM' in os.environ: + env_base['ENV']['TERM'] = os.environ['TERM'] env_base.AppendENVPath('PATH', os.getenv('PATH')) env_base.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH')) env_base.global_defaults=global_defaults @@ -142,7 +144,7 @@ opts.Add("LINKFLAGS", "Custom flags for the linker"); opts.Add('unix_global_settings_path', 'unix-specific path to system-wide settings. Currently only used by templates.','') opts.Add('disable_3d', 'Disable 3D nodes for smaller executable (yes/no)', "no") opts.Add('disable_advanced_gui', 'Disable advance 3D gui nodes and behaviors (yes/no)', "no") -opts.Add('colored', 'Enable colored output for the compilation (yes/no)', 'no') +opts.Add('verbose', 'Enable verbose output for the compilation (yes/no)', 'yes') opts.Add('deprecated','Enable deprecated features (yes/no)','yes') opts.Add('extra_suffix', 'Custom extra suffix added to the base filename of all generated binary files.', '') opts.Add('vsproj', 'Generate Visual Studio Project. (yes/no)', 'no') @@ -329,8 +331,8 @@ if selected_platform in platform_list: if (env['xml']=='yes'): env.Append(CPPFLAGS=['-DXML_ENABLED']) - if (env['colored']=='yes'): - methods.colored(sys,env) + if (env['verbose']=='no'): + methods.no_verbose(sys,env) Export('env') diff --git a/methods.py b/methods.py index c4951c69bd..477fe4f12f 100755 --- a/methods.py +++ b/methods.py @@ -1416,7 +1416,7 @@ def save_active_platforms(apnames,ap): logow.write(str) -def colored(sys,env): +def no_verbose(sys,env): #If the output is not a terminal, do nothing if not sys.stdout.isatty(): diff --git a/platform/osx/detect.py b/platform/osx/detect.py index f8b2153aee..4e772e37eb 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -91,9 +91,6 @@ def configure(env): env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND']) env["CC"]="clang" env["LD"]="clang++" - if (env["colored"]=="yes"): - if sys.stdout.isatty(): - env.Append(CPPFLAGS=["-fcolor-diagnostics"]) import methods diff --git a/platform/server/detect.py b/platform/server/detect.py index 2f6fb00e0d..ce14100fd0 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -38,9 +38,6 @@ 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 eb71ac7409..917a8a27d7 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -94,10 +94,6 @@ def configure(env): env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND']) env.extra_suffix=".llvm" - if (env["colored"]=="yes"): - if sys.stdout.isatty(): - env.Append(CXXFLAGS=["-fcolor-diagnostics"]) - if (env["use_sanitizer"]=="yes"): env.Append(CXXFLAGS=['-fsanitize=address','-fno-omit-frame-pointer']) env.Append(LINKFLAGS=['-fsanitize=address']) |