1 Star 0 Fork 0

滔滔江水/double-conversion

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
SConstruct 1.60 KB
一键复制 编辑 原始数据 按行查看 历史
Florian Loitsch 提交于 2019-05-05 18:12 . Usefulcat master (#98)
# vim:ft=python
import os
double_conversion_sources = ['double-conversion/' + x for x in SConscript('double-conversion/SConscript')]
double_conversion_test_sources = ['test/cctest/' + x for x in SConscript('test/cctest/SConscript')]
DESTDIR = ARGUMENTS.get('DESTDIR', '')
prefix = ARGUMENTS.get('prefix', '/usr/local')
lib = ARGUMENTS.get('libsuffix', 'lib')
libdir = os.path.join(DESTDIR + prefix, lib)
env = Environment(CPPPATH='#', LIBS=['m', 'stdc++'],
CXXFLAGS=ARGUMENTS.get('CXXFLAGS', ''))
debug = ARGUMENTS.get('debug', 0)
optimize = ARGUMENTS.get('optimize', 0)
env.Replace(CXX = ARGUMENTS.get('CXX', 'g++'))
# for shared lib, requires scons 2.3.0
env['SHLIBVERSION'] = '3.0.0'
CCFLAGS = []
if int(debug):
CCFLAGS.append(ARGUMENTS.get('CXXFLAGS', '-g -Wall -Wshadow -Werror -UNDEBUG'))
if int(optimize):
CCFLAGS.append(ARGUMENTS.get('CXXFLAGS', '-O3 -DNDEBUG=1'))
env.Append(CCFLAGS = " ".join(CCFLAGS))
double_conversion_shared_objects = [
env.SharedObject(src) for src in double_conversion_sources]
double_conversion_static_objects = [
env.StaticObject(src) for src in double_conversion_sources]
library_name = 'double-conversion'
static_lib = env.StaticLibrary(library_name, double_conversion_static_objects)
static_lib_pic = env.StaticLibrary(library_name + '_pic', double_conversion_shared_objects)
shared_lib = env.SharedLibrary(library_name, double_conversion_shared_objects)
env.Program('run_tests', double_conversion_test_sources, LIBS=[static_lib])
env.InstallVersionedLib(libdir, shared_lib)
env.Install(libdir, static_lib)
env.Install(libdir, static_lib_pic)
env.Alias('install', libdir)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/taotaojs/double-conversion.git
git@gitee.com:taotaojs/double-conversion.git
taotaojs
double-conversion
double-conversion
master

搜索帮助