[Scons-users] toolkit choice on cross-compiling

Philipp Kraus philipp.kraus at flashpixx.de
Thu Apr 11 09:56:01 EDT 2013


Hello,

I'm searching for a solution for a simple "tooldetection" eg for cross-compiling or using different toolsets.
Eg I use under *nix system gcc with a cross-toolchain for Windows and on Windows MinGW and MSVC.

Scons works well with all of them, but at the moment I have declared a enum parameter eg
vars.Add(EnumVariable("buildtoolkit", "value for the build toolkit", "default", allowed_values=("default", "mingw", "msvc")))

and after that I do
env = Environment( tools=[] )
if env["buildtoolkit"] == "mingw"
env.Tool("mingw")
elif env["buildtoolkit"] == "msvc"
env.Tool("msvc")
env.Tool("mslink")
....
else :
env.Tool("default")

Is this a good choise for set up different toolkits for build (in my case I set also an architecture flag
for different architectures and so different comipler and linker)? Is there a better solution?

Thx

Phil


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130411/7486fa3f/attachment.html>


More information about the Scons-users mailing list