本文整理汇总了Python中waflib.Configure.conf.cmd_to_list函数的典型用法代码示例。如果您正苦于以下问题:Python cmd_to_list函数的具体用法?Python cmd_to_list怎么用?Python cmd_to_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cmd_to_list函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: mkspec_gxx_configure
def mkspec_gxx_configure(conf, major, minor, prefix=None, minimum=False):
"""
:param major: The major version number of the compiler, e.g. 4
:param minor: The minor version number of the compiler, e.g. 6
:param prefix: Prefix to the compiler name, e.g. 'arm-linux-androideabi'
:param minimum: Only check for a minimum compiler version, if true
"""
# Where to look for the compiler
paths = conf.mkspec_get_toolchain_paths()
# Find g++ first
gxx_names = conf.mkspec_get_gnu_binary_name('g++', major, minor, prefix)
if minimum:
gxx_names = 'g++'
cxx = conf.find_program(gxx_names, path_list=paths)
cxx = conf.cmd_to_list(cxx)
conf.env['CXX'] = cxx
conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))
if minimum:
conf.mkspec_check_minimum_cc_version(cxx, major, minor)
else:
conf.mkspec_check_cc_version(cxx, major, minor)
# Also find gcc
gcc_names = conf.mkspec_get_gnu_binary_name('gcc', major, minor, prefix)
if minimum:
gcc_names = 'gcc'
cc = conf.find_program(gcc_names, path_list=paths)
cc = conf.cmd_to_list(cc)
conf.env['CC'] = cc
conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))
if minimum:
conf.mkspec_check_minimum_cc_version(cc, major, minor)
else:
conf.mkspec_check_cc_version(cc, major, minor)
# Find the archiver
ar = conf.mkspec_get_ar_binary_name(prefix)
conf.find_program(ar, path_list=paths, var='AR')
conf.env.ARFLAGS = 'rcs'
# Set up C++ tools and flags
conf.gxx_common_flags()
conf.gxx_modifier_platform()
conf.cxx_load_tools()
conf.cxx_add_flags()
# Also set up C tools and flags
conf.gcc_common_flags()
conf.gcc_modifier_platform()
conf.cc_load_tools()
conf.cc_add_flags()
# Add linker flags
conf.link_add_flags()
# Add our own cxx flags
conf.mkspec_set_gxx_cxxflags()
# Add our own cc flags
conf.mkspec_set_gcc_ccflags()
示例2: find_android_gxx
def find_android_gxx(conf):
exeDir = os.path.join(conf.options.ndk, "toolchains", "arm-linux-androideabi-4.6", "prebuilt", "windows-x86_64", "bin")
cxx=conf.find_program(['arm-linux-androideabi-g++'], var = "CXX", path_list=[exeDir])
cxx=conf.cmd_to_list(cxx)
conf.get_cc_version(cxx,gcc=True)
conf.env.CXX_NAME='gcc'
conf.env.CXX=cxx
示例3: check_cython_version
def check_cython_version(conf, minver):
conf.start_msg("Checking cython version")
minver = tuple(minver)
import re
version_re = re.compile(r'cython\s*version\s*(?P<major>\d*)\.(?P<minor>\d*)(?:\.(?P<micro>\d*))?', re.I).search
cmd = conf.cmd_to_list(conf.env['CYTHON'])
cmd = cmd + ['--version']
from waflib.Tools import fc_config
stdout, stderr = fc_config.getoutput(conf, cmd)
if stdout:
match = version_re(stdout)
else:
match = version_re(stderr)
if not match:
conf.fatal("cannot determine the Cython version")
cy_ver = [match.group('major'), match.group('minor')]
if match.group('micro'):
cy_ver.append(match.group('micro'))
else:
cy_ver.append('0')
cy_ver = tuple([int(x) for x in cy_ver])
if cy_ver < minver:
conf.end_msg(False)
conf.fatal("cython version %s < %s" % (cy_ver, minver))
conf.end_msg(str(cy_ver))
示例4: find_solstudio
def find_solstudio(conf):
"""Find the Solaris Studio compiler (will look in the environment variable 'FC')"""
fc = conf.find_program(['sunf95', 'f95', 'sunf90', 'f90'], var='FC')
fc = conf.cmd_to_list(fc)
conf.get_solstudio_version(fc)
conf.env.FC_NAME = 'SOL'
示例5: find_openf95
def find_openf95(conf):
"""Find the Open64 Fortran Compiler (will look in the environment variable 'FC')"""
fc = conf.find_program(['openf95', 'openf90'], var='FC')
fc = conf.cmd_to_list(fc)
conf.get_open64_version(fc)
conf.env.FC_NAME='OPEN64'
示例6: find_gfortran
def find_gfortran(conf):
"""Find the gfortran program (will look in the environment variable 'FC')"""
fc = conf.find_program(["gfortran", "g77"], var="FC")
# (fallback to g77 for systems, where no gfortran is available)
fc = conf.cmd_to_list(fc)
conf.get_gfortran_version(fc)
conf.env.FC_NAME = "GFORTRAN"
示例7: find_crayftn
def find_crayftn(conf):
"""Find the Cray fortran compiler (will look in the environment variable 'FC')"""
fc = conf.find_program(['crayftn'], var='FC')
fc = conf.cmd_to_list(fc)
conf.get_crayftn_version(fc)
conf.env.FC_NAME = 'CRAY'
conf.env.FC_MOD_CAPITALIZATION = 'UPPER.mod'
示例8: find_xlf
def find_xlf(conf):
"""Find the xlf program (will look in the environment variable 'FC')"""
fc = conf.find_program(['xlf2003_r', 'xlf2003', 'xlf95_r', 'xlf95', 'xlf90_r', 'xlf90', 'xlf_r', 'xlf'], var='FC')
fc = conf.cmd_to_list(fc)
conf.get_xlf_version(fc)
conf.env.FC_NAME='XLF'
示例9: find_xlc
def find_xlc(conf):
"""
Detect the Aix C compiler
"""
cc = conf.find_program(['xlc_r', 'xlc'], var='CC')
cc = conf.cmd_to_list(cc)
conf.env.CC_NAME = 'xlc'
conf.env.CC = cc
示例10: find_nag
def find_nag(conf):
"""Find the NAG Fortran Compiler (will look in the environment variable 'FC')"""
fc = conf.find_program(['nagfor'], var='FC')
fc = conf.cmd_to_list(fc)
conf.get_nag_version(fc)
conf.env.FC_NAME = 'NAG'
conf.env.FC_MOD_CAPITALIZATION = 'lower'
示例11: find_xlcxx
def find_xlcxx(conf):
"""
Detect the Aix C++ compiler
"""
cxx = conf.find_program(['xlc++_r', 'xlc++'], var='CXX')
cxx = conf.cmd_to_list(cxx)
conf.env.CXX_NAME = 'xlc++'
conf.env.CXX = cxx
示例12: find_xlcxx
def find_xlcxx(conf):
"""
Detect the Aix C++ compiler
"""
cxx = conf.find_program(["xlc++_r", "xlc++"], var="CXX")
cxx = conf.cmd_to_list(cxx)
conf.env.CXX_NAME = "xlc++"
conf.env.CXX = cxx
示例13: find_gxx
def find_gxx(conf):
"""
Find the program g++, and if present, try to detect its version number
"""
cxx = conf.find_program(["g++", "c++"], var="CXX")
cxx = conf.cmd_to_list(cxx)
conf.get_cc_version(cxx, gcc=True)
conf.env.CXX_NAME = "gcc"
conf.env.CXX = cxx
示例14: find_gcc
def find_gcc(conf):
"""
Find the program gcc, and if present, try to detect its version number
"""
cc = conf.find_program(['gcc', 'cc'], var='CC')
cc = conf.cmd_to_list(cc)
conf.get_cc_version(cc, gcc=True)
conf.env.CC_NAME = 'gcc'
conf.env.CC = cc
示例15: find_arm_gcc
def find_arm_gcc(conf):
"""
Find the program gcc, and if present, try to detect its version number
"""
cc = conf.find_program(['arm-none-eabi-gcc', 'arm-none-linux-gnueabi-gcc'], var='CC')
cc = conf.cmd_to_list(cc)
conf.get_cc_version(cc, gcc=True)
conf.env.CC_NAME = 'arm-gcc'
conf.env.CC = cc