本文整理汇总了Python中util.get_flags函数的典型用法代码示例。如果您正苦于以下问题:Python get_flags函数的具体用法?Python get_flags怎么用?Python get_flags使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_flags函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: enabled
def enabled(self, build):
build.flags['perftools'] = util.get_flags(build.env, 'perftools', 0)
build.flags['perftools_profiler'] = util.get_flags(
build.env, 'perftools_profiler', 0)
if int(build.flags['perftools']):
return True
return False
开发者ID:flashpig,项目名称:mixxx,代码行数:7,代码来源:features.py
示例2: enabled
def enabled(self, build):
# Meh, repeating this can't hurt, and we require knowing the status of msvcdebug.
build.flags['msvcdebug'] = util.get_flags(build.env, 'msvcdebug', 0)
build.flags['optimize'] = util.get_flags(build.env, 'optimize', 1)
if int(build.flags['optimize']):
return True
else:
return False
开发者ID:happysoftcore,项目名称:mixxx,代码行数:8,代码来源:features.py
示例3: sse_enabled
def sse_enabled(self, build):
optimize = int(util.get_flags(build.env, "optimize", 1))
return (
build.machine_is_64bit
or (build.toolchain_is_msvs and optimize > 2)
or (build.toolchain_is_gnu and optimize > 1)
)
开发者ID:happysoftcore,项目名称:mixxx,代码行数:7,代码来源:depends.py
示例4: configure
def configure(self, build, conf):
if not self.enabled(build):
return
if int(util.get_flags(build.env, 'qt_sqlite_plugin', 0)):
raise Exception('WARNING: localecompare is not compatible with the Qt SQLite plugin')
if not conf.CheckLib(['sqlite3']):
raise Exception('Missing libsqlite3 -- exiting!')
build.env.Append(CPPDEFINES='__SQLITE3__')
开发者ID:flashpig,项目名称:mixxx,代码行数:8,代码来源:features.py
示例5: configure
def configure(self, build, conf):
if build.platform_is_windows:
build.env.Append(CPPDEFINES = 'WIN%s' % build.bitwidth)
build.env.Append(CPPPATH=['#lib/%s' % self.SOUNDTOUCH_PATH])
# TODO(XXX) when we figure out a better way to represent features, fix
# this.
optimize = int(util.get_flags(build.env, 'optimize', 1))
if build.machine_is_64bit or \
(build.toolchain_is_msvs and optimize > 1) or \
(build.toolchain_is_gnu and optimize > 2):
build.env.Append(CPPDEFINES='ALLOW_X86_OPTIMIZATIONS')
开发者ID:amilcarsantos,项目名称:maemo-midij,代码行数:12,代码来源:depends.py
示例6: configure
def configure(self, build, conf, env=None):
if env is None:
env = build.env
if build.platform_is_windows:
# Regardless of the bitwidth, ST checks for WIN32
env.Append(CPPDEFINES="WIN32")
env.Append(CPPPATH=["#lib/%s" % self.SOUNDTOUCH_PATH])
# Check if the compiler has SSE extention enabled
# Allways the case on x64 (core instructions)
optimize = int(util.get_flags(env, "optimize", 1))
if self.sse_enabled(build):
env.Append(CPPDEFINES="SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS")
开发者ID:happysoftcore,项目名称:mixxx,代码行数:13,代码来源:depends.py
示例7: sources
def sources(self, build):
sources = ['engine/enginebufferscalest.cpp',
'#lib/%s/SoundTouch.cpp' % self.SOUNDTOUCH_PATH,
'#lib/%s/TDStretch.cpp' % self.SOUNDTOUCH_PATH,
'#lib/%s/RateTransposer.cpp' % self.SOUNDTOUCH_PATH,
'#lib/%s/AAFilter.cpp' % self.SOUNDTOUCH_PATH,
'#lib/%s/FIFOSampleBuffer.cpp' % self.SOUNDTOUCH_PATH,
'#lib/%s/FIRFilter.cpp' % self.SOUNDTOUCH_PATH,
'#lib/%s/PeakFinder.cpp' % self.SOUNDTOUCH_PATH,
'#lib/%s/BPMDetect.cpp' % self.SOUNDTOUCH_PATH]
if build.platform_is_windows and build.toolchain_is_msvs:
if build.machine_is_64bit:
sources.append(
'#lib/%s/cpu_detect_x64_win.cpp' % self.SOUNDTOUCH_PATH)
elif build.machine == 'x86':
sources.append(
'#lib/%s/cpu_detect_x86_win.cpp' % self.SOUNDTOUCH_PATH)
else:
raise Exception("Unhandled CPU configuration for SoundTouch")
elif build.toolchain_is_gnu:
if build.machine == 'x86_64':
sources.append(
'#lib/%s/cpu_detect_x64_gcc.cpp' % self.SOUNDTOUCH_PATH)
else:
sources.append(
'#lib/%s/cpu_detect_x86_gcc.cpp' % self.SOUNDTOUCH_PATH)
else:
raise Exception("Unhandled CPU configuration for SoundTouch")
# TODO(XXX) when we figure out a better way to represent features, fix
# this.
optimize = int(util.get_flags(build.env, 'optimize', 1))
if build.machine_is_64bit or \
(build.toolchain_is_msvs and optimize > 1) or \
(build.toolchain_is_gnu and optimize > 2):
sources.extend(
['#lib/%s/mmx_optimized.cpp' % self.SOUNDTOUCH_PATH,
'#lib/%s/sse_optimized.cpp' % self.SOUNDTOUCH_PATH,
])
if build.toolchain_is_msvs and not build.machine_is_64bit:
sources.append('#lib/%s/3dnow_win.cpp' % self.SOUNDTOUCH_PATH)
else:
# TODO(XXX) the docs refer to a 3dnow_gcc, but we don't seem to have
# it.
pass
return sources
开发者ID:amilcarsantos,项目名称:maemo-midij,代码行数:47,代码来源:depends.py
示例8: enabled
def enabled(self, build):
build.flags['optimize'] = util.get_flags(build.env, 'optimize', 1)
if int(build.flags['optimize']):
return True
else:
return False
开发者ID:abhinavtankha,项目名称:mixxx,代码行数:6,代码来源:features.py
示例9: enabled
def enabled(self, build):
build.flags['msvshacks'] = util.get_flags(build.env, 'msvshacks', 0)
if int(build.flags['msvshacks']):
return True
return False
开发者ID:Shunty,项目名称:mixxx,代码行数:5,代码来源:features.py
示例10: qt5_enabled
def qt5_enabled(build):
return int(util.get_flags(build.env, 'qt5', 0))
开发者ID:technosomething,项目名称:mixxx,代码行数:2,代码来源:depends.py
示例11: configure
def configure(self, build, conf):
qt_modules = Qt.enabled_modules(build)
qt5 = Qt.qt5_enabled(build)
# Emit various Qt defines
build.env.Append(CPPDEFINES=['QT_SHARED',
'QT_TABLET_SUPPORT'])
if qt5:
# Enable qt4 support.
build.env.Append(CPPDEFINES='QT_DISABLE_DEPRECATED_BEFORE')
# Set qt_sqlite_plugin flag if we should package the Qt SQLite plugin.
build.flags['qt_sqlite_plugin'] = util.get_flags(
build.env, 'qt_sqlite_plugin', 0)
# Enable Qt include paths
if build.platform_is_linux:
if qt5 and not conf.CheckForPKG('Qt5Core', '5.0'):
raise Exception('Qt >= 5.0 not found')
elif not qt5 and not conf.CheckForPKG('QtCore', '4.6'):
raise Exception('QT >= 4.6 not found')
# This automatically converts QtXXX to Qt5XXX where appropriate.
if qt5:
build.env.EnableQt5Modules(qt_modules, debug=False)
else:
build.env.EnableQt4Modules(qt_modules, debug=False)
if qt5:
# Note that -reduce-relocations is enabled by default in Qt5.
# So we must build the code with position independent code
build.env.Append(CCFLAGS='-fPIE')
elif build.platform_is_bsd:
build.env.Append(LIBS=qt_modules)
include_paths = ['$QTDIR/include/%s' % module
for module in qt_modules]
build.env.Append(CPPPATH=include_paths)
elif build.platform_is_osx:
qtdir = build.env['QTDIR']
build.env.Append(
LINKFLAGS=' '.join('-framework %s' % m for m in qt_modules)
)
framework_path = Qt.find_framework_path(qtdir)
if not framework_path:
raise Exception(
'Could not find frameworks in Qt directory: %s' % qtdir)
# Necessary for raw includes of headers like #include <qobject.h>
build.env.Append(CPPPATH=[os.path.join(framework_path, '%s.framework' % m, 'Headers')
for m in qt_modules])
# Framework path needs to be altered for CCFLAGS as well since a
# header include of QtCore/QObject.h looks for a QtCore.framework on
# the search path and a QObject.h in QtCore.framework/Headers.
build.env.Append(CCFLAGS=['-F%s' % os.path.join(framework_path)])
build.env.Append(LINKFLAGS=['-F%s' % os.path.join(framework_path)])
# Copied verbatim from qt4.py and qt5.py.
# TODO(rryan): Get our fixes merged upstream so we can use qt4.py
# and qt5.py for OS X.
qt4_module_defines = {
'QtScript' : ['QT_SCRIPT_LIB'],
'QtSvg' : ['QT_SVG_LIB'],
'Qt3Support' : ['QT_QT3SUPPORT_LIB','QT3_SUPPORT'],
'QtSql' : ['QT_SQL_LIB'],
'QtXml' : ['QT_XML_LIB'],
'QtOpenGL' : ['QT_OPENGL_LIB'],
'QtGui' : ['QT_GUI_LIB'],
'QtNetwork' : ['QT_NETWORK_LIB'],
'QtCore' : ['QT_CORE_LIB'],
}
qt5_module_defines = {
'QtScript' : ['QT_SCRIPT_LIB'],
'QtSvg' : ['QT_SVG_LIB'],
'QtSql' : ['QT_SQL_LIB'],
'QtXml' : ['QT_XML_LIB'],
'QtOpenGL' : ['QT_OPENGL_LIB'],
'QtGui' : ['QT_GUI_LIB'],
'QtNetwork' : ['QT_NETWORK_LIB'],
'QtCore' : ['QT_CORE_LIB'],
'QtWidgets' : ['QT_WIDGETS_LIB'],
}
module_defines = qt5_module_defines if qt5 else qt4_module_defines
for module in qt_modules:
build.env.AppendUnique(CPPDEFINES=module_defines.get(module, []))
if qt5:
build.env["QT5_MOCCPPPATH"] = build.env["CPPPATH"]
else:
build.env["QT4_MOCCPPPATH"] = build.env["CPPPATH"]
elif build.platform_is_windows:
# This automatically converts QtCore to QtCore[45][d] where
# appropriate.
if qt5:
build.env.EnableQt5Modules(qt_modules,
debug=build.build_is_debug)
else:
build.env.EnableQt4Modules(qt_modules,
debug=build.build_is_debug)
#.........这里部分代码省略.........
开发者ID:technosomething,项目名称:mixxx,代码行数:101,代码来源:depends.py
注:本文中的util.get_flags函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论