#!/usr/bin/env python

import platform

bld_subdirs = [
    'example1',
    'example2',
    'example3',
    'example4'
]

def options(opt):
    opt.recurse( bld_subdirs )


def configure(conf):
    if conf.options.disable_exceptions:
        conf.msg( 'Warning','Exceptions disabled. Example exceptions will not compile' )
    else:
        conf.env.ISIX_CPP_EXAMPLES_EX_EXAMPLE_NEEDED = True
        conf.recurse( 'example_exceptions' )
    conf.recurse( bld_subdirs )

def build(bld):
    global bld_subdirs
    bld.recurse( bld_subdirs )
    if bld.env.ISIX_CPP_EXAMPLES_EX_EXAMPLE_NEEDED:
        bld.recurse( 'example_exceptions' )


