I have a C ++ / Python project that I was working on, and still relied on Visual Studio to manage assemblies. Now I want to automate the build process, I hope it includes support for several platforms (all this is standard C ++ / Python) and I think that SCons can be a tool to do this work.
Several directories use a lot of source files, but a typical (stereo) example looks like this:
foo.lib directory_1 bar1_1.cpp bar1_2.cpp ... etc. ... directory_2 bar2_1.cpp bar2_2.cpp ... etc. ...
So, in other words, the source files are in a hierarchy, but there is only one purpose. (The hierarchy maps to the namespaces used in the code, but this is unnecessary for the purpose of this question.)
My question is: what is the best way to structure SConstruct and SConscript files? I read the SCons documentation, in particular the Hierarchical Assemblies section, and the idea of ββusing multiple SConscript files with matching SConscript calls. Everything seems clear and especially neat. However, this seems to be intended for a hierarchy with several goals. Can I use the same function where there is only one purpose?
(I really thought about the top-level SConstruct / SConscript file, at least for the library in question, listing the entire source file using subdirectories, but I donβt βfeelβ the best way to do this. Perhaps this is the way forward?)
Thanks a lot in advance for any advice / understanding.
source share