sconscript

来自「dysii是一款非常出色的滤波函数库」· 代码 · 共 38 行

TXT
38
字号
import osimport os.pathImport(['env', 'precompile', 'objects', 'headers', 'releases'])# Precompile aux.hppif env['GCC_PCH']:  defines = ''  if env.has_key('CPPDEFINES'):    for define in env['CPPDEFINES']:      defines += ' -D' + define  precompile.append(env.Command('aux.hpp.gch', 'aux.hpp', env['CXX'] + " " +      env['CXXFLAGS'] + defines +      " -xc++-header -o $TARGET $SOURCES"))# Build list of source files and subdirectoriescwd = os.getcwd()files = os.listdir(cwd)for file in files:  path = os.path.join(cwd, file)  if os.path.isdir(file):    file = os.path.join(file, 'SConscript')    if os.path.isfile(file):      env.SConscript(file)  elif os.path.isfile(file):    if file.endswith('.cpp') or file.endswith('.c'):      objects.append(env.StaticObject(file))      releases.append(path)    elif file.endswith('.hpp') or file.endswith('.h'):      headers.append(path)      releases.append(path)      if env['GCC_PCH']:        # aux.hpp not scanned when compiled, so need to record dependencies        env.Depends('aux.hpp.gch', file)    elif file == 'SConscript':      releases.append(path)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?