當前位置: 首頁>>代碼示例>>Python>>正文


Python UnixCCompiler.__init__方法代碼示例

本文整理匯總了Python中distutils.unixccompiler.UnixCCompiler.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python UnixCCompiler.__init__方法的具體用法?Python UnixCCompiler.__init__怎麽用?Python UnixCCompiler.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在distutils.unixccompiler.UnixCCompiler的用法示例。


在下文中一共展示了UnixCCompiler.__init__方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from distutils.unixccompiler import UnixCCompiler [as 別名]
# 或者: from distutils.unixccompiler.UnixCCompiler import __init__ [as 別名]
def __init__(self, verbose=0, dry_run=0, force=0):
        UnixCCompiler.__init__(self, verbose, dry_run, force)

        v = self.get_version()
        mpopt = 'openmp' if v and v < '15' else 'qopenmp'
        self.cc_exe = ('icc -fPIC -fp-model strict -O3 '
                       '-fomit-frame-pointer -{}').format(mpopt)
        compiler = self.cc_exe

        if platform.system() == 'Darwin':
            shared_flag = '-Wl,-undefined,dynamic_lookup'
        else:
            shared_flag = '-shared'
        self.set_executables(compiler=compiler,
                             compiler_so=compiler,
                             compiler_cxx=compiler,
                             archiver='xiar' + ' cru',
                             linker_exe=compiler + ' -shared-intel',
                             linker_so=compiler + ' ' + shared_flag +
                             ' -shared-intel') 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:22,代碼來源:intelccompiler.py

示例2: __init__

# 需要導入模塊: from distutils.unixccompiler import UnixCCompiler [as 別名]
# 或者: from distutils.unixccompiler.UnixCCompiler import __init__ [as 別名]
def __init__(self, verbose=0, dry_run=0, force=0):
        UnixCCompiler.__init__(self, verbose, dry_run, force)
        self.cc_exe = ('icc -m64 -fPIC -fp-model strict -O3 '
                       '-fomit-frame-pointer -openmp')
        compiler = self.cc_exe
        if platform.system() == 'Darwin':
            shared_flag = '-Wl,-undefined,dynamic_lookup'
        else:
            shared_flag = '-shared'
        self.set_executables(compiler=compiler,
                             compiler_so=compiler,
                             compiler_cxx=compiler,
                             archiver='xiar' + ' cru',
                             linker_exe=compiler + ' -shared-intel',
                             linker_so=compiler + ' ' + shared_flag +
                             ' -shared-intel') 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:18,代碼來源:intelccompiler.py

示例3: __init__

# 需要導入模塊: from distutils.unixccompiler import UnixCCompiler [as 別名]
# 或者: from distutils.unixccompiler.UnixCCompiler import __init__ [as 別名]
def __init__(self, verbose=0, dry_run=0, force=0):
        UnixCCompiler.__init__(self, verbose, dry_run, force)
        self.cc_exe = ('icc -fPIC -fp-model strict -O3 '
                       '-fomit-frame-pointer -openmp')
        compiler = self.cc_exe
        if platform.system() == 'Darwin':
            shared_flag = '-Wl,-undefined,dynamic_lookup'
        else:
            shared_flag = '-shared'
        self.set_executables(compiler=compiler,
                             compiler_so=compiler,
                             compiler_cxx=compiler,
                             archiver='xiar' + ' cru',
                             linker_exe=compiler + ' -shared-intel',
                             linker_so=compiler + ' ' + shared_flag +
                             ' -shared-intel') 
開發者ID:abhisuri97,項目名稱:auto-alt-text-lambda-api,代碼行數:18,代碼來源:intelccompiler.py

示例4: __init__

# 需要導入模塊: from distutils.unixccompiler import UnixCCompiler [as 別名]
# 或者: from distutils.unixccompiler.UnixCCompiler import __init__ [as 別名]
def __init__ (self, verbose=0, dry_run=0, force=0):
        UnixCCompiler.__init__ (self, verbose, dry_run, force)
        cc_compiler = self.cc_exe
        cxx_compiler = self.cxx_exe
        self.set_executables(compiler=cc_compiler,
                             compiler_so=cc_compiler,
                             compiler_cxx=cxx_compiler,
                             linker_exe=cc_compiler,
                             linker_so=cc_compiler + ' -shared') 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:11,代碼來源:pathccompiler.py

示例5: __init__

# 需要導入模塊: from distutils.unixccompiler import UnixCCompiler [as 別名]
# 或者: from distutils.unixccompiler.UnixCCompiler import __init__ [as 別名]
def __init__ (self,
                  verbose=0,
                  dry_run=0,
                  force=0):

        UnixCCompiler.__init__ (self, verbose, dry_run, force)

        (status, details) = check_config_h()
        self.debug_print("Python's GCC status: %s (details: %s)" %
                         (status, details))
        if status is not CONFIG_H_OK:
            self.warn(
                "Python's pyconfig.h doesn't seem to support your compiler.  " +
                ("Reason: %s." % details) +
                "Compiling may fail because of undefined preprocessor macros.")

        (self.gcc_version, self.ld_version) = \
            get_versions()
        self.debug_print(self.compiler_type + ": gcc %s, ld %s\n" %
                         (self.gcc_version,
                          self.ld_version) )

        # Hard-code GCC because that's what this is all about.
        # XXX optimization, warnings etc. should be customizable.
        self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
                             compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
                             linker_exe='gcc -Zomf -Zmt -Zcrtdll',
                             linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')

        # want the gcc library statically linked (so that we don't have
        # to distribute a version dependent on the compiler we have)
        self.dll_libraries=["gcc"]

    # __init__ () 
開發者ID:glmcdona,項目名稱:meddle,代碼行數:36,代碼來源:emxccompiler.py


注:本文中的distutils.unixccompiler.UnixCCompiler.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。