本文整理汇总了Python中waflib.Task.compile_fun_noshell方法的典型用法代码示例。如果您正苦于以下问题:Python Task.compile_fun_noshell方法的具体用法?Python Task.compile_fun_noshell怎么用?Python Task.compile_fun_noshell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waflib.Task
的用法示例。
在下文中一共展示了Task.compile_fun_noshell方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configuration
# 需要导入模块: from waflib import Task [as 别名]
# 或者: from waflib.Task import compile_fun_noshell [as 别名]
As such, we do as if the files were compiled one by one, but no command is actually run:
replace each cc/cpp Task by a TaskSlave. A new task called TaskMaster collects the
signatures from each slave and finds out the command-line to run.
It is only necessary to import this module in the configuration (no other change required)
"""
import os
from waflib import TaskGen, Task, Build, Logs
from waflib.TaskGen import extension, feature, before_method, after_method
MAX_BATCH = 50
c_str = '${CC} ${CFLAGS} ${CPPFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} -c ${SRCLST}'
#c_str = '${CC} ${CCFLAGS} ${CPPFLAGS} ${_CCINCFLAGS} ${_CCDEFFLAGS} -c ${SRCLST}'
c_fun, _ = Task.compile_fun_noshell(c_str)
cxx_str = '${CXX} ${CXXFLAGS} ${CPPFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} -c ${SRCLST}'
#cxx_str = '${CXX} ${CXXFLAGS} ${CPPFLAGS} ${_CXXINCFLAGS} ${_CXXDEFFLAGS} -c ${SRCLST}'
cxx_fun, _ = Task.compile_fun_noshell(cxx_str)
count = 70000
class batch_task(Task.Task):
color = 'RED'
after = ['c', 'cxx']
before = ['cprogram', 'cshlib', 'cstlib', 'cxxprogram', 'cxxshlib', 'cxxstlib']
def __str__(self):
return '(batch compilation for %d slaves)\n' % len(self.slaves)