我使用了 scons 几天,有点困惑。为什么没有用于从给定根目录开始递归构建源代码的内置工具?让我解释一下:我有这样的来源处置:
src
Core
folder1
folder2
subfolder2_1
Std
folder1
..等等。这棵树可能更深。
现在我用这样的结构来建造它:
sources = Glob('./builds/Std/*/*.cpp')
sources = sources + Glob('./builds/Std/*.cpp')
sources = sources + Glob('./builds/Std/*/*/*.cpp')
sources = sources + Glob('./builds/Std/*/*/*/*.cpp')
这看起来并不完美。当然,我可以编写一些 python 代码,但是有更合适的方法吗?