Please note:The SCons wiki is now restored from the attack in March 2013. All old passwords have been invalidated. Please reset your password if you have an account. If you note missing pages, please report them to webmaster@scons.org. Also, new account creation is currently disabled due to an ongoing spam flood (2013/08/27).
Differences between revisions 15 and 16
Revision 15 as of 2005-03-22 14:17:54
Size: 781
Editor: d120
Comment:
Revision 16 as of 2008-03-12 02:47:13
Size: 781
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

The ARGUMENTS dictionary contains the command line arguments you passed in, for example:

C:\projects> scons.py myproject release=1

The value retrieved from the dictionary is a string. Here's an example:

if ARGUMENTS.get('release', '0') == '1':
  print "*** Release build..."
  buildroot = 'release'
else:
  print "*** Debug build..."
  buildroot = 'debug'


If the command line is :

C:\projects> scons.py myproject -c

The output is:

*** Debug build...


If the command line is :

C:\projects> scons.py myproject -c release=0

The output is:

*** Debug build...


If the command line is :

C:\projects> scons.py myproject -c release=1

The output is:

*** Release build...

UsingCommandLineArguments (last edited 2008-03-12 02:47:13 by localhost)