Răsfoiți Sursa

SCons: Use colored output if available, change "colored"->"verbose"

(cherry picked from commit 2bf4553fe056c1fab5367dfae62426d3c7cf8168)
Błażej Szczygieł 8 ani în urmă
părinte
comite
85a7105345
5 a modificat fișierele cu 6 adăugiri și 14 ștergeri
  1. 5 3
      SConstruct
  2. 1 1
      methods.py
  3. 0 3
      platform/osx/detect.py
  4. 0 3
      platform/server/detect.py
  5. 0 4
      platform/x11/detect.py

+ 5 - 3
SConstruct

@@ -66,6 +66,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
@@ -146,7 +148,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')
@@ -335,8 +337,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')
 

+ 1 - 1
methods.py

@@ -1414,7 +1414,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():

+ 0 - 3
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
 

+ 0 - 3
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
 

+ 0 - 4
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'])