Adding Multiple Command-Line Build Options at Once

Lastly, SCons provides a way to add multiple build options to an Options object at once. Instead of having to call the Add method multiple times, you can call the AddOptions method with a list of build options to be added to the object. Each build option is specified as either a tuple of arguments, just like you'd pass to the Add method itself, or as a call to one of the canned functions for pre-packaged command-line build options. in any order:

        opts = Options()
        opts.AddOptions(
            ('RELEASE', 'Set to 1 to build for release', 0),
            ('CONFIG', 'Configuration file', '/etc/my_config'),
            BoolOption('warnings', 'compilation with -Wall and similiar', 1),
            EnumOption('debug', 'debug output and symbols', 'no',
                       allowed_values=('yes', 'no', 'full'),
                       map={}, ignorecase=0),  # case sensitive
            ListOption('shared',
                       'libraries to build as shared libraries',
                       'all',
                       names = list_of_libs),
            PackageOption('x11',
                          'use X11 installed here (yes = search some places)',
                          'yes'),
            PathOption('qtdir', 'where the root of Qt is installed', qtdir),
        )