Skip to content

Commit 2765030

Browse files
committed
Fix output build dir name and command line options for custom compilation
1 parent abe923c commit 2765030

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,8 @@ def initOptions(self):
454454
Read options from configuration files and at last from the command line
455455
(which has the last word)
456456
'''
457+
458+
self.env.Tool('default')
457459
# default values
458460
if self.windows:
459461
self.compiler = compiler.visual
@@ -478,11 +480,12 @@ def initOptions(self):
478480
else:
479481
self.env['CCVERSION'] = self.compiler.version(self.env['CC'])
480482
self.env['CXXVERSION'] = self.compiler.version(self.env['CXX'])
481-
483+
482484
# select the environment from user options
483485
compilerName = self.env['compiler']
484486
self.compiler = eval( 'compiler.' + compilerName )
485487
self.CC = self.compiler.CC
488+
486489
if self.windows:
487490
if compilerName == 'visual':
488491
self.env.Tool('default')
@@ -492,8 +495,6 @@ def initOptions(self):
492495
else:
493496
self.env.Tool('default')
494497
print 'Error: Unrecognized compiler value on this platform. ('+str(compilerName)+')'
495-
else:
496-
self.env.Tool('default')
497498

498499
def createOptions(self, filename, args):
499500
'''

compiler/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
linkBin = ccBin
1313
linkxxBin = cxxBin
1414

15-
def version( bin = 'gcc' ):
15+
def version( bin = ccBin ):
1616
import subprocess
1717
try:
1818
return subprocess.Popen( [bin, CC['version']], stdout=subprocess.PIPE, stderr=subprocess.PIPE ).communicate()[0].strip()

0 commit comments

Comments
 (0)