mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 10:03:51 +01:00
Updated platform on linux-gcc to include compiler version (necessary for multiple targets built in same directory, and not a bad idea for other builds).
This commit is contained in:
parent
02c7fe78d3
commit
f1a49467cf
20
SConstruct
20
SConstruct
@ -14,6 +14,16 @@ options.Add( EnumOption('platform',
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
platform = ARGUMENTS['platform']
|
platform = ARGUMENTS['platform']
|
||||||
|
if platform == 'linux-gcc':
|
||||||
|
CXX = 'g++' # not quite right, but env is not yet available.
|
||||||
|
import commands
|
||||||
|
version = commands.getoutput('%s -dumpversion' %CXX)
|
||||||
|
platform = 'linux-gcc-%s' %version
|
||||||
|
print "Using platform '%s'" %platform
|
||||||
|
LD_LIBRARY_PATH = os.environ.get('LD_LIBRARY_PATH', '')
|
||||||
|
LD_LIBRARY_PATH = "%s:libs/%s" %(LD_LIBRARY_PATH, platform)
|
||||||
|
os.environ['LD_LIBRARY_PATH'] = LD_LIBRARY_PATH
|
||||||
|
print "LD_LIBRARY_PATH =", LD_LIBRARY_PATH
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print 'You must specify a "platform"'
|
print 'You must specify a "platform"'
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
@ -74,11 +84,9 @@ elif platform == 'msvc80':
|
|||||||
elif platform == 'mingw':
|
elif platform == 'mingw':
|
||||||
env.Tool( 'mingw' )
|
env.Tool( 'mingw' )
|
||||||
env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )
|
env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )
|
||||||
elif platform == 'linux-gcc':
|
elif platform.startswith('linux-gcc'):
|
||||||
env.Tool( 'default' )
|
env.Tool( 'default' )
|
||||||
env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" )
|
env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" )
|
||||||
LD_LIBRARY_PATH = os.environ.get('LD_LIBRARY_PATH', '')
|
|
||||||
os.environ['LD_LIBRARY_PATH'] = "%s:libs/linux-gcc" %LD_LIBRARY_PATH
|
|
||||||
else:
|
else:
|
||||||
print "UNSUPPORTED PLATFORM."
|
print "UNSUPPORTED PLATFORM."
|
||||||
env.Exit(1)
|
env.Exit(1)
|
||||||
@ -174,3 +182,9 @@ env.Alias( 'src-dist', srcdist_cmd )
|
|||||||
buildProjectInDirectory( 'src/jsontestrunner' )
|
buildProjectInDirectory( 'src/jsontestrunner' )
|
||||||
buildProjectInDirectory( 'src/lib_json' )
|
buildProjectInDirectory( 'src/lib_json' )
|
||||||
buildProjectInDirectory( 'doc' )
|
buildProjectInDirectory( 'doc' )
|
||||||
|
|
||||||
|
# libs was happening before bin by chance, I think. When I added
|
||||||
|
# the compiler version to linux-gcc, the order changed. This
|
||||||
|
# fixes it (I believe).
|
||||||
|
env.Depends('bin', 'libs')
|
||||||
|
env.Depends('check', 'bin')
|
||||||
|
Loading…
Reference in New Issue
Block a user