示例#1
0
def boost_std(inc=None, lib=None):
    # The default definitions for pre-built libraries.
    rules.project(['boost'], ['usage-requirements'] +
                  ['<include>{}'.format(i)
                   for i in inc] + ['<define>BOOST_ALL_NO_LIB'],
                  ['requirements'] + ['<search>{}'.format(l) for l in lib])

    # TODO: There should be a better way to add a Python function into a
    # project requirements property set.
    tag_prop_set = property_set.create([property.Property('<tag>', tag_std)])
    attributes = projects.attributes(projects.current().project_module())
    attributes.requirements = attributes.requirements.refine(tag_prop_set)

    alias('headers')

    def boost_lib(lib_name, dyn_link_macro):
        if (isinstance(lib_name, str)):
            lib_name = [lib_name]
        builtin.lib(lib_name,
                    usage_requirements=[
                        '<link>shared:<define>{}'.format(dyn_link_macro)
                    ])

    boost_lib('container', 'BOOST_CONTAINER_DYN_LINK')
    boost_lib('date_time', 'BOOST_DATE_TIME_DYN_LINK')
    boost_lib('filesystem', 'BOOST_FILE_SYSTEM_DYN_LINK')
    boost_lib('graph', 'BOOST_GRAPH_DYN_LINK')
    boost_lib('graph_parallel', 'BOOST_GRAPH_DYN_LINK')
    boost_lib('iostreams', 'BOOST_IOSTREAMS_DYN_LINK')
    boost_lib('locale', 'BOOST_LOG_DYN_LINK')
    boost_lib('log', 'BOOST_LOG_DYN_LINK')
    boost_lib('log_setup', 'BOOST_LOG_DYN_LINK')
    boost_lib('math_tr1', 'BOOST_MATH_TR1_DYN_LINK')
    boost_lib('math_tr1f', 'BOOST_MATH_TR1_DYN_LINK')
    boost_lib('math_tr1l', 'BOOST_MATH_TR1_DYN_LINK')
    boost_lib('math_c99', 'BOOST_MATH_TR1_DYN_LINK')
    boost_lib('math_c99f', 'BOOST_MATH_TR1_DYN_LINK')
    boost_lib('math_c99l', 'BOOST_MATH_TR1_DYN_LINK')
    boost_lib('mpi', 'BOOST_MPI_DYN_LINK')
    boost_lib('program_options', 'BOOST_PROGRAM_OPTIONS_DYN_LINK')
    boost_lib('python', 'BOOST_PYTHON_DYN_LINK')
    boost_lib('python3', 'BOOST_PYTHON_DYN_LINK')
    boost_lib('random', 'BOOST_RANDOM_DYN_LINK')
    boost_lib('regex', 'BOOST_REGEX_DYN_LINK')
    boost_lib('serialization', 'BOOST_SERIALIZATION_DYN_LINK')
    boost_lib('wserialization', 'BOOST_SERIALIZATION_DYN_LINK')
    boost_lib('signals', 'BOOST_SIGNALS_DYN_LINK')
    boost_lib('system', 'BOOST_SYSTEM_DYN_LINK')
    boost_lib('unit_test_framework', 'BOOST_TEST_DYN_LINK')
    boost_lib('prg_exec_monitor', 'BOOST_TEST_DYN_LINK')
    boost_lib('test_exec_monitor', 'BOOST_TEST_DYN_LINK')
    boost_lib('thread', 'BOOST_THREAD_DYN_DLL')
    boost_lib('wave', 'BOOST_WAVE_DYN_LINK')
示例#2
0
def boost_std(inc=None, lib=None):
    # The default definitions for pre-built libraries.
    rules.project(
        ["boost"],
        ["usage-requirements"] + ["<include>{}".format(i) for i in inc] + ["<define>BOOST_ALL_NO_LIB"],
        ["requirements"] + ["<search>{}".format(l) for l in lib],
    )

    # TODO: There should be a better way to add a Python function into a
    # project requirements property set.
    tag_prop_set = property_set.create([property.Property("<tag>", tag_std)])
    attributes = projects.attributes(projects.current().project_module())
    attributes.requirements = attributes.requirements.refine(tag_prop_set)

    alias("headers")

    def boost_lib(lib_name, dyn_link_macro):
        if isinstance(lib_name, str):
            lib_name = [lib_name]
        builtin.lib(lib_name, usage_requirements=["<link>shared:<define>{}".format(dyn_link_macro)])

    boost_lib("date_time", "BOOST_DATE_TIME_DYN_LINK")
    boost_lib("filesystem", "BOOST_FILE_SYSTEM_DYN_LINK")
    boost_lib("graph", "BOOST_GRAPH_DYN_LINK")
    boost_lib("graph_parallel", "BOOST_GRAPH_DYN_LINK")
    boost_lib("iostreams", "BOOST_IOSTREAMS_DYN_LINK")
    boost_lib("locale", "BOOST_LOG_DYN_LINK")
    boost_lib("log", "BOOST_LOG_DYN_LINK")
    boost_lib("log_setup", "BOOST_LOG_DYN_LINK")
    boost_lib("math_tr1", "BOOST_MATH_TR1_DYN_LINK")
    boost_lib("math_tr1f", "BOOST_MATH_TR1_DYN_LINK")
    boost_lib("math_tr1l", "BOOST_MATH_TR1_DYN_LINK")
    boost_lib("math_c99", "BOOST_MATH_TR1_DYN_LINK")
    boost_lib("math_c99f", "BOOST_MATH_TR1_DYN_LINK")
    boost_lib("math_c99l", "BOOST_MATH_TR1_DYN_LINK")
    boost_lib("mpi", "BOOST_MPI_DYN_LINK")
    boost_lib("program_options", "BOOST_PROGRAM_OPTIONS_DYN_LINK")
    boost_lib("python", "BOOST_PYTHON_DYN_LINK")
    boost_lib("python3", "BOOST_PYTHON_DYN_LINK")
    boost_lib("random", "BOOST_RANDOM_DYN_LINK")
    boost_lib("regex", "BOOST_REGEX_DYN_LINK")
    boost_lib("serialization", "BOOST_SERIALIZATION_DYN_LINK")
    boost_lib("wserialization", "BOOST_SERIALIZATION_DYN_LINK")
    boost_lib("signals", "BOOST_SIGNALS_DYN_LINK")
    boost_lib("system", "BOOST_SYSTEM_DYN_LINK")
    boost_lib("unit_test_framework", "BOOST_TEST_DYN_LINK")
    boost_lib("prg_exec_monitor", "BOOST_TEST_DYN_LINK")
    boost_lib("test_exec_monitor", "BOOST_TEST_DYN_LINK")
    boost_lib("thread", "BOOST_THREAD_DYN_DLL")
    boost_lib("wave", "BOOST_WAVE_DYN_LINK")
示例#3
0
def boost_std(inc = None, lib = None):
    # The default definitions for pre-built libraries.
    rules.project(
        ['boost'],
        ['usage-requirements'] + ['<include>{}'.format(i) for i in inc] + ['<define>BOOST_ALL_NO_LIB'],
        ['requirements'] + ['<search>{}'.format(l) for l in lib])

    # TODO: There should be a better way to add a Python function into a
    # project requirements property set.
    tag_prop_set = property_set.create([property.Property('<tag>', tag_std)])
    attributes = projects.attributes(projects.current().project_module())
    attributes.requirements = attributes.requirements.refine(tag_prop_set)

    alias('headers')

    def boost_lib(lib_name, dyn_link_macro):
        if (isinstance(lib_name,str)):
            lib_name = [lib_name]
        builtin.lib(lib_name, usage_requirements=['<link>shared:<define>{}'.format(dyn_link_macro)])

    boost_lib('container'           , 'BOOST_CONTAINER_DYN_LINK'      )
    boost_lib('date_time'           , 'BOOST_DATE_TIME_DYN_LINK'      )
    boost_lib('filesystem'          , 'BOOST_FILE_SYSTEM_DYN_LINK'    )
    boost_lib('graph'               , 'BOOST_GRAPH_DYN_LINK'          )
    boost_lib('graph_parallel'      , 'BOOST_GRAPH_DYN_LINK'          )
    boost_lib('iostreams'           , 'BOOST_IOSTREAMS_DYN_LINK'      )
    boost_lib('locale'              , 'BOOST_LOG_DYN_LINK'            )
    boost_lib('log'                 , 'BOOST_LOG_DYN_LINK'            )
    boost_lib('log_setup'           , 'BOOST_LOG_DYN_LINK'            )
    boost_lib('math_tr1'            , 'BOOST_MATH_TR1_DYN_LINK'       )
    boost_lib('math_tr1f'           , 'BOOST_MATH_TR1_DYN_LINK'       )
    boost_lib('math_tr1l'           , 'BOOST_MATH_TR1_DYN_LINK'       )
    boost_lib('math_c99'            , 'BOOST_MATH_TR1_DYN_LINK'       )
    boost_lib('math_c99f'           , 'BOOST_MATH_TR1_DYN_LINK'       )
    boost_lib('math_c99l'           , 'BOOST_MATH_TR1_DYN_LINK'       )
    boost_lib('mpi'                 , 'BOOST_MPI_DYN_LINK'            )
    boost_lib('program_options'     , 'BOOST_PROGRAM_OPTIONS_DYN_LINK')
    boost_lib('python'              , 'BOOST_PYTHON_DYN_LINK'         )
    boost_lib('python3'             , 'BOOST_PYTHON_DYN_LINK'         )
    boost_lib('random'              , 'BOOST_RANDOM_DYN_LINK'         )
    boost_lib('regex'               , 'BOOST_REGEX_DYN_LINK'          )
    boost_lib('serialization'       , 'BOOST_SERIALIZATION_DYN_LINK'  )
    boost_lib('wserialization'      , 'BOOST_SERIALIZATION_DYN_LINK'  )
    boost_lib('signals'             , 'BOOST_SIGNALS_DYN_LINK'        )
    boost_lib('system'              , 'BOOST_SYSTEM_DYN_LINK'         )
    boost_lib('unit_test_framework' , 'BOOST_TEST_DYN_LINK'           )
    boost_lib('prg_exec_monitor'    , 'BOOST_TEST_DYN_LINK'           )
    boost_lib('test_exec_monitor'   , 'BOOST_TEST_DYN_LINK'           )
    boost_lib('thread'              , 'BOOST_THREAD_DYN_DLL'          )
    boost_lib('wave'                , 'BOOST_WAVE_DYN_LINK'           )