Commits

Matt Oswald  committed b0c9246

supporting CXX env var, falling back to g++-4.7 if it does not exist

  • Participants
  • Parent commits 7154ed6

Comments (0)

Files changed (2)

File .build/build.sconscript

 if env['windows'] == True:
     SConscript('msvc.sconscript', exports = 'env')
 else:
-    env['CXX'] = 'g++-4.7'
     env.Append(CCFLAGS = [ '-pthread', '-fPIC', '-Wall', '-Wextra', '-pedantic', '-std=c++11' ])
     env.Append(CCFLAGS = [ '-Wno-comment' ])
-env = Environment()
-
 import platform
 import os
 
+env = Environment()
+
 cpus = 0
 if platform.system() == 'Windows':
     env['windows'] = True
     cpus = os.environ['NUMBER_OF_PROCESSORS']
 else:
     env['windows'] = False
+    env['CXX'] = os.environ['CXX']
+    env['ENV']['TERM'] = os.environ['TERM']
     cpus = os.sysconf('SC_NPROCESSORS_ONLN')
 
+    if len(env['CXX']) == 0 :
+        env['CXX'] = 'g++-4.7'
+
 # max jobs?
 if cpus <= 0:
     cpus = 1