Browse Source

Support for colorgcc

rdb 16 years ago
parent
commit
2d86e3ec31
1 changed files with 3 additions and 0 deletions
  1. 3 0
      makepanda/makepandacore.py

+ 3 - 0
makepanda/makepandacore.py

@@ -20,6 +20,7 @@ MAINTHREAD=threading.currentThread()
 OUTPUTDIR="built"
 OUTPUTDIR="built"
 CUSTOM_OUTPUTDIR=False
 CUSTOM_OUTPUTDIR=False
 OPTIMIZE="3"
 OPTIMIZE="3"
+USE_COLORGCC=os.path.isfile("/usr/bin/colorgcc")
 
 
 ########################################################################
 ########################################################################
 ##
 ##
@@ -130,6 +131,8 @@ def oscmd(cmd, ignoreError = False):
                 exit("Cannot find "+exe+" on search path")
                 exit("Cannot find "+exe+" on search path")
         res = os.spawnl(os.P_WAIT, exe, cmd)
         res = os.spawnl(os.P_WAIT, exe, cmd)
     else:
     else:
+        if (USE_COLORGCC and (cmd.startswith("g++ ") or cmd.startswith("gcc "))):
+            cmd = "colorgcc" + cmd[3:]
         res = os.system(cmd)
         res = os.system(cmd)
     if res != 0 and not ignoreError:
     if res != 0 and not ignoreError:
         exit("")
         exit("")