[Scons-users] How to select toolchain

Bill Deegan bill at baddogconsulting.com
Mon Apr 27 15:54:18 EDT 2015


Nikolaus,

env = Environment(tools=[list of all tools you need])

Where that list will likely include:
compiler
linker
perhaps archiver (if you're creating static libraries)
Anything else you might need.

We are aware it's a bit clunky to do it this way and there is a
re-engineering of the toolchain logic in progress, though it may take a
while to come to fruition.


-Bill

On Mon, Apr 27, 2015 at 10:26 AM, Nikolaus Rath <nrath at trialphaenergy.com>
wrote:

> Hello,
>
> What is the proper way to select a compiler toolchain? I thought in
> order to e.g. select the Intel Fortran compiler, I'd just have to do:
>
> $ cat SConstruct
> # Attention, emacs, this is a -*- python -*- file.
> env = Environment(tools=['ifort'])
> env.Program('test', 'test.F')
>
> but it fails with:
>
> $ scons
> scons: Reading SConscript files ...
> AttributeError: 'SConsEnvironment' object has no attribute 'Program':
>   File "/home/nikratio/tmp/SConstruct", line 3:
>     env.Program('test', 'test.F')
>
>
> If I use tools = ['default', 'ifort'] instead, it seems to work. But as
> I understand
> http://www.scons.org/doc/production/HTML/scons-user.html#idp505552, this
> means that scons will first try to auto-detect all the tools it knows
> about.
>
> What's the proper way to avoid auto-detection and explicitly specify a
> toolchain?
>
> Thanks,
> -Nikolaus
>
> --
> Nikolaus Rath, Ph.D.
> Senior Scientist
> Tri Alpha Energy, Inc.
> +1 949 830 2117 ext 211
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150427/953322fa/attachment-0001.html>


More information about the Scons-users mailing list