Exemplo n.º 1
0
def create_variables():
    import sconsconfig as config
    from SCons.Script import Variables, EnumVariable, BoolVariable, PathVariable
    vars = Variables('config.py') # Persistent storage.
    vars.AddVariables(
        ('CC', 'Set C compiler.'),
        ('CXX', 'Set CXX compiler.'),
        EnumVariable('BUILD', 'Set the build type.', 'debug', allowed_values=('debug', 'dbgopt', 'optimised', 'testopt')),
        EnumVariable('BITS', 'Set number of bits.', 'default', allowed_values=('32', '64', 'default')),
        BoolVariable('PROF', 'Enable profiling.', False),
        BoolVariable('LOG', 'Enable logging.', True),
        # BoolVariable('LOG_TRIVIAL', 'Enable trivial logging.', True),
        # BoolVariable('LOG_DEBUG', 'Enable debug logging.', True),
        BoolVariable('WITH_OPENMP', 'Enable threading with OpenMP.', False),
        BoolVariable('WITH_TAU', 'Enable tau profiling.', False),
        BoolVariable('WITH_GCOV', 'Enable coverage testing with gcov.', False),
        PathVariable('PREFIX', 'Set install location.', '/usr/local', PathVariable.PathIsDirCreate),
        BoolVariable('BUILD_STATIC_LIBS', 'Build static libraries.', True),
        BoolVariable('BUILD_SHARED_LIBS', 'Build shared libraries.', True),
        BoolVariable('BUILD_TESTS', 'Build unit tests.', True),
        BoolVariable('BUILD_EXS', 'Build unit tests.', True),
        BoolVariable('BUILD_APPS', 'Build applications.', True),
        BoolVariable('BUILD_DOC', 'Build documentation.', False),
        BoolVariable('INSTALL_SUB', 'Install subproject libraries.', False),
        BoolVariable('DOWNLOAD_ALL', 'Download and install dependencies automatically.', False),
    )

    # Add options from any packages we want to use.
    config.add_options(vars)

    return vars
Exemplo n.º 2
0
def create_variables():
    import sconsconfig as config
    from SCons.Script import Variables, EnumVariable, BoolVariable, PathVariable
    vars = Variables('config.py') # Persistent storage.
    vars.AddVariables(
        ('CC', 'Set C compiler.'),
        ('CXX', 'Set CXX compiler.'),
        EnumVariable('BUILD', 'Set the build type.', 'debug', allowed_values=('debug', 'optimised')),
        EnumVariable('BITS', 'Set number of bits.', 'default', allowed_values=('32', '64', 'default')),
        BoolVariable('PROF', 'Enable profiling.', False),
        BoolVariable('WITH_TAU', 'Enable tau profiling.', False),
        BoolVariable('WITH_GCOV', 'Enable coverage testing with gcov.', False),
        PathVariable('PREFIX', 'Set install location.', '/usr/local', PathVariable.PathIsDirCreate),
        BoolVariable('BUILD_STATIC_LIBS', 'Build static libraries.', True),
        BoolVariable('BUILD_SHARED_LIBS', 'Build shared libraries.', True),
        BoolVariable('BUILD_TESTS', 'Build unit tests.', True),
        BoolVariable('BUILD_EXS', 'Build unit tests.', True),
        BoolVariable('BUILD_APPS', 'Build applications.', True),
        BoolVariable('BUILD_DOC', 'Build documentation.', False),
    )

    # Add options from any packages we want to use.
    config.add_options(vars)

    return vars