当前位置: 首页>>代码示例>>Python>>正文


Python BoostBuild.get_toolset方法代码示例

本文整理汇总了Python中BoostBuild.get_toolset方法的典型用法代码示例。如果您正苦于以下问题:Python BoostBuild.get_toolset方法的具体用法?Python BoostBuild.get_toolset怎么用?Python BoostBuild.get_toolset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BoostBuild的用法示例。


在下文中一共展示了BoostBuild.get_toolset方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: in

# 需要导入模块: import BoostBuild [as 别名]
# 或者: from BoostBuild import get_toolset [as 别名]
#!/usr/bin/python

# Copyright 2002-2005 Dave Abrahams.
# Copyright 2002-2006 Vladimir Prus.
# Distributed under the Boost Software License, Version 1.0.
#    (See accompanying file LICENSE_1_0.txt or copy at
#         http://www.boost.org/LICENSE_1_0.txt)

import os
import sys
import string
import BoostBuild

xml = "--xml" in sys.argv
toolset = BoostBuild.get_toolset()


# Clear environment for testing.
#
for s in ("BOOST_ROOT", "BOOST_BUILD_PATH", "JAM_TOOLSET", "BCCROOT", "MSVCDir", "MSVC", "MSVCNT", "MINGW", "watcom"):
    try:
        del os.environ[s]
    except:
        pass

BoostBuild.set_defer_annotations(1)


def run_tests(critical_tests, other_tests):
    """Runs first critical tests and then other_tests.
开发者ID:,项目名称:,代码行数:32,代码来源:

示例2: defined

# 需要导入模块: import BoostBuild [as 别名]
# 或者: from BoostBuild import get_toolset [as 别名]
lib a : a.cpp ;
install dist : a ;
""")

t.write("a/a.cpp", """
#if defined(_WIN32)
__declspec(dllexport)
#endif
void a() {}
""")

t.run_build_system(subdir="a")
t.expect_addition("a/dist/a.dll")

if ( ( os.name == 'nt' ) or os.uname()[0].lower().startswith('cygwin') ) and \
    ( BoostBuild.get_toolset() != 'gcc' ):
    # This is windows import library -- we know the exact name.
    file = "a/dist/a.lib"
else:
    file = t.adjust_names(["a/dist/a.dll"])[0]

t.write("b/jamfile.jam", """
lib b : b.cpp ../%s ;
""" % file)

t.write("b/b.cpp", """
#if defined(_WIN32)
__declspec(dllimport)
#endif
void a();
#if defined(_WIN32)
开发者ID:elemel,项目名称:boost-python,代码行数:33,代码来源:library_chain.py

示例3: __declspec

# 需要导入模块: import BoostBuild [as 别名]
# 或者: from BoostBuild import get_toolset [as 别名]
    "lib/test_lib.cpp",
    """
#ifdef _WIN32
__declspec(dllexport)
#endif
void foo() {}
""",
)

t.run_build_system(subdir="lib")
t.expect_addition("lib/bin/$toolset/debug/test_lib.dll")


# Auto adjusting of suffixes does not work, since we need to
# change dll to lib.
if ((os.name == "nt") or os.uname()[0].lower().startswith("cygwin")) and (BoostBuild.get_toolset() != "gcc"):
    t.copy("lib/bin/$toolset/debug/test_lib.implib", "lib/test_lib.implib")
    t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/test_lib.dll")
else:
    t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/test_lib.dll")


# Test that the simplest usage of searched library works.
t.write("jamroot.jam", "")

t.write(
    "jamfile.jam",
    """
import path ;
import project ;
开发者ID:ibrahim01832891988,项目名称:ssh-rd,代码行数:32,代码来源:searched_lib.py

示例4: __declspec

# 需要导入模块: import BoostBuild [as 别名]
# 或者: from BoostBuild import get_toolset [as 别名]
t.write("lib/jamfile.jam", "lib test_lib : test_lib.cpp ;")
t.write("lib/test_lib.cpp", """
#ifdef _WIN32
__declspec(dllexport)
#endif
void foo() {}
""");

t.run_build_system(subdir="lib")
t.expect_addition("lib/bin/$toolset/debug/test_lib.dll")


# Auto adjusting of suffixes does not work, since we need to
# change dll to lib.
if ( ( os.name == "nt" ) or os.uname()[0].lower().startswith("cygwin") ) and \
    ( BoostBuild.get_toolset() != "gcc" ):
    t.copy("lib/bin/$toolset/debug/test_lib.implib", "lib/test_lib.implib")
    t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/test_lib.dll")
else:
    t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/test_lib.dll")


# Test that the simplest usage of searched library works.
t.write("jamroot.jam", "")

t.write("jamfile.jam", """
import path ;
import project ;

local here = [ project.attribute $(__name__) location ] ;
here = [ path.root $(here) [ path.pwd ] ] ;
开发者ID:CambrianTech,项目名称:boost-build,代码行数:33,代码来源:searched_lib.py


注:本文中的BoostBuild.get_toolset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。