Minor fixes in Scons script
This commit is contained in:
parent
5c13171e29
commit
a02dafb8d7
19
SConstruct
19
SConstruct
@ -4,25 +4,30 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
AddOption('--cxx', dest='cxx', type='string', nargs=1, action='store', metavar='STRING', help='C++ Compiler')
|
AddOption('--cxx', dest='cxx', type='string', nargs=1, action='store', metavar='STRING', help='C++ Compiler')
|
||||||
AddOption('--verbosity', dest='cxx', type='string', nargs=1, action='store', metavar='STRING', help='make Scons talking')
|
AddOption('--verbosity', dest='verbosity', type='string', nargs=1, action='store', metavar='STRING', help='make Scons talking')
|
||||||
|
AddOption('--buildconfiguration', dest='buildconfiguration', type='string', nargs=1, action='store', metavar='STRING', help='debug or release')
|
||||||
env = Environment(COMPILER = GetOption('cxx'))
|
env = Environment(COMPILER = GetOption('cxx'))
|
||||||
if not GetOption('cxx') == '':
|
if GetOption('cxx') is None:
|
||||||
env.Replace(CXX = GetOption('cxx'))
|
#default Compiler
|
||||||
|
print 'Using default C++ Compiler: ', env['CXX']
|
||||||
|
else:
|
||||||
|
print 'Using user supplied C++ Compiler: ', env['CXX']
|
||||||
|
env.Replace(CXX = GetOption('cxx'))
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
#SCons really wants to use Microsoft compiler :D
|
#SCons really wants to use Microsoft compiler
|
||||||
print "Compiling has not been done on Windows"
|
print "Compiling is not yet supported on Windows"
|
||||||
Exit(-1)
|
Exit(-1)
|
||||||
else: #Mac OS X
|
else: #Mac OS X
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
print "Compiling is experimental on Mac"
|
print "Compiling is experimental on Mac"
|
||||||
env.Append(CPPPATH = ['/opt/local/include/', '/opt/local/include/libxml2'])
|
env.Append(CPPPATH = ['/opt/local/include/', '/opt/local/include/libxml2'])
|
||||||
env.Append(LIBPATH = ['/opt/local/lib'])
|
env.Append(LIBPATH = ['/opt/local/lib'])
|
||||||
#env.Replace(CC = "g++-mp-4.4")
|
|
||||||
else:
|
else:
|
||||||
env.Append(CPPPATH = ['/usr/include', '/usr/include/include', '/usr/include/libxml2/'])
|
env.Append(CPPPATH = ['/usr/include', '/usr/include/include', '/usr/include/libxml2/'])
|
||||||
|
|
||||||
env.Append(CCFLAGS = ' -O3')
|
env.Append(CCFLAGS = ' -O3')
|
||||||
print "Compiling with: ", env['CXX']
|
#print "Compiling with: ", env['CXX']
|
||||||
conf = Configure(env)
|
conf = Configure(env)
|
||||||
if not conf.CheckCXX():
|
if not conf.CheckCXX():
|
||||||
print "No suitable C++ Compiler installed"
|
print "No suitable C++ Compiler installed"
|
||||||
|
Loading…
Reference in New Issue
Block a user