SConstruct (5396:0347e9a6d2c2) | SConstruct (5397:58e5b68f7095) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 289 unchanged lines hidden (view full) --- 298 299global_sticky_opts_file = joinpath(build_root, 'options.global') 300 301global_sticky_opts = Options(global_sticky_opts_file, args=ARGUMENTS) 302 303global_sticky_opts.AddOptions( 304 ('CC', 'C compiler', os.environ.get('CC', env['CC'])), 305 ('CXX', 'C++ compiler', os.environ.get('CXX', env['CXX'])), | 1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 289 unchanged lines hidden (view full) --- 298 299global_sticky_opts_file = joinpath(build_root, 'options.global') 300 301global_sticky_opts = Options(global_sticky_opts_file, args=ARGUMENTS) 302 303global_sticky_opts.AddOptions( 304 ('CC', 'C compiler', os.environ.get('CC', env['CC'])), 305 ('CXX', 'C++ compiler', os.environ.get('CXX', env['CXX'])), |
306 ('BATCH', 'Use batch pool for build and tests', False), 307 ('BATCH_CMD', 'Batch pool submission command name', 'qdo'), |
|
306 ('EXTRAS', 'Add Extra directories to the compilation', '', 307 PathListAllExist, PathListMakeAbsolute) 308 ) 309 310 311# base help text 312help_text = ''' 313Usage: scons [scons options] [build options] [target(s)] --- 50 unchanged lines hidden (view full) --- 364 env.Append(CCFLAGS='-library=stlport4') 365 env.Append(CCFLAGS='-xar') 366# env.Append(CCFLAGS='-instances=semiexplicit') 367else: 368 print 'Error: Don\'t know what compiler options to use for your compiler.' 369 print ' Please fix SConstruct and src/SConscript and try again.' 370 Exit(1) 371 | 308 ('EXTRAS', 'Add Extra directories to the compilation', '', 309 PathListAllExist, PathListMakeAbsolute) 310 ) 311 312 313# base help text 314help_text = ''' 315Usage: scons [scons options] [build options] [target(s)] --- 50 unchanged lines hidden (view full) --- 366 env.Append(CCFLAGS='-library=stlport4') 367 env.Append(CCFLAGS='-xar') 368# env.Append(CCFLAGS='-instances=semiexplicit') 369else: 370 print 'Error: Don\'t know what compiler options to use for your compiler.' 371 print ' Please fix SConstruct and src/SConscript and try again.' 372 Exit(1) 373 |
374# Do this after we save setting back, or else we'll tack on an 375# extra 'qdo' every time we run scons. 376if env['BATCH']: 377 env['CC'] = env['BATCH_CMD'] + ' ' + env['CC'] 378 env['CXX'] = env['BATCH_CMD'] + ' ' + env['CXX'] 379 |
|
372if sys.platform == 'cygwin': 373 # cygwin has some header file issues... 374 env.Append(CCFLAGS=Split("-Wno-uninitialized")) 375env.Append(CPPPATH=[Dir('ext/dnet')]) 376 377# Check for SWIG 378if not env.has_key('SWIG'): 379 print 'Error: SWIG utility not found.' --- 52 unchanged lines hidden (view full) --- 432 if uname[0] == 'Darwin' and compare_versions(uname[2], '9.0.0') >= 0: 433 if int(subprocess.Popen('sysctl -n hw.cpu64bit_capable', shell=True, 434 stdout=subprocess.PIPE, stderr=subprocess.STDOUT, 435 close_fds=True).communicate()[0][0]): 436 env.Append(CCFLAGS='-arch x86_64') 437 env.Append(CFLAGS='-arch x86_64') 438 env.Append(LINKFLAGS='-arch x86_64') 439 env.Append(ASFLAGS='-arch x86_64') | 380if sys.platform == 'cygwin': 381 # cygwin has some header file issues... 382 env.Append(CCFLAGS=Split("-Wno-uninitialized")) 383env.Append(CPPPATH=[Dir('ext/dnet')]) 384 385# Check for SWIG 386if not env.has_key('SWIG'): 387 print 'Error: SWIG utility not found.' --- 52 unchanged lines hidden (view full) --- 440 if uname[0] == 'Darwin' and compare_versions(uname[2], '9.0.0') >= 0: 441 if int(subprocess.Popen('sysctl -n hw.cpu64bit_capable', shell=True, 442 stdout=subprocess.PIPE, stderr=subprocess.STDOUT, 443 close_fds=True).communicate()[0][0]): 444 env.Append(CCFLAGS='-arch x86_64') 445 env.Append(CFLAGS='-arch x86_64') 446 env.Append(LINKFLAGS='-arch x86_64') 447 env.Append(ASFLAGS='-arch x86_64') |
440 env['OSX64bit'] = True | |
441except: 442 pass 443 444# Recent versions of scons substitute a "Null" object for Configure() 445# when configuration isn't necessary, e.g., if the "--help" option is 446# present. Unfortuantely this Null object always returns false, 447# breaking all our configuration checks. We replace it with our own 448# more optimistic null object that returns True instead. --- 138 unchanged lines hidden (view full) --- 587 'Make floating-point results compatible with SimpleScalar', 588 False), 589 BoolOption('USE_SSE2', 590 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts', 591 False), 592 BoolOption('USE_MYSQL', 'Use MySQL for stats output', have_mysql), 593 BoolOption('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv), 594 BoolOption('USE_CHECKER', 'Use checker for detailed CPU models', False), | 448except: 449 pass 450 451# Recent versions of scons substitute a "Null" object for Configure() 452# when configuration isn't necessary, e.g., if the "--help" option is 453# present. Unfortuantely this Null object always returns false, 454# breaking all our configuration checks. We replace it with our own 455# more optimistic null object that returns True instead. --- 138 unchanged lines hidden (view full) --- 594 'Make floating-point results compatible with SimpleScalar', 595 False), 596 BoolOption('USE_SSE2', 597 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts', 598 False), 599 BoolOption('USE_MYSQL', 'Use MySQL for stats output', have_mysql), 600 BoolOption('USE_FENV', 'Use <fenv.h> IEEE mode control', have_fenv), 601 BoolOption('USE_CHECKER', 'Use checker for detailed CPU models', False), |
595 BoolOption('BATCH', 'Use batch pool for build and tests', False), 596 ('BATCH_CMD', 'Batch pool submission command name', 'qdo'), | |
597 ('PYTHONHOME', 598 'Override the default PYTHONHOME for this system (use with caution)', 599 '%s:%s' % (sys.prefix, sys.exec_prefix)), 600 ) 601 602nonsticky_opts.AddOptions( 603 BoolOption('update_ref', 'Update test reference outputs', False) 604 ) --- 209 unchanged lines hidden (view full) --- 814 else: 815 print "Compiling in", build_dir, "with MySQL support." 816 env.ParseConfig(mysql_config_libs) 817 env.ParseConfig(mysql_config_include) 818 819 # Save sticky option settings back to current options file 820 sticky_opts.Save(current_opts_file, env) 821 | 602 ('PYTHONHOME', 603 'Override the default PYTHONHOME for this system (use with caution)', 604 '%s:%s' % (sys.prefix, sys.exec_prefix)), 605 ) 606 607nonsticky_opts.AddOptions( 608 BoolOption('update_ref', 'Update test reference outputs', False) 609 ) --- 209 unchanged lines hidden (view full) --- 819 else: 820 print "Compiling in", build_dir, "with MySQL support." 821 env.ParseConfig(mysql_config_libs) 822 env.ParseConfig(mysql_config_include) 823 824 # Save sticky option settings back to current options file 825 sticky_opts.Save(current_opts_file, env) 826 |
822 # Do this after we save setting back, or else we'll tack on an 823 # extra 'qdo' every time we run scons. 824 if env['BATCH']: 825 env['CC'] = env['BATCH_CMD'] + ' ' + env['CC'] 826 env['CXX'] = env['BATCH_CMD'] + ' ' + env['CXX'] 827 | |
828 if env['USE_SSE2']: 829 env.Append(CCFLAGS='-msse2') 830 831 # The src/SConscript file sets up the build rules in 'env' according 832 # to the configured options. It returns a list of environments, 833 # one for each variant build (debug, opt, etc.) 834 envList = SConscript('src/SConscript', build_dir = build_path, 835 exports = 'env') --- 17 unchanged lines hidden --- | 827 if env['USE_SSE2']: 828 env.Append(CCFLAGS='-msse2') 829 830 # The src/SConscript file sets up the build rules in 'env' according 831 # to the configured options. It returns a list of environments, 832 # one for each variant build (debug, opt, etc.) 833 envList = SConscript('src/SConscript', build_dir = build_path, 834 exports = 'env') --- 17 unchanged lines hidden --- |