[Scons-users] [Scons-dev] compiler (tools) search order in SConstruct
bill at baddogconsulting.com
Mon Sep 24 13:14:04 EDT 2012
You could use 3 environments each initialized to pick 1 tool and then check the tools they find, and use that to select which environment you use for your build?
On Sep 24, 2012, at 7:44 AM, Gary Oberbrunner <garyo at oberbrunner.com> wrote:
> On Mon, Sep 24, 2012 at 9:30 AM, Ludmil T Zikatanov
> <ltzmultigrid at gmail.com> wrote:
>> Thanks for the prompt reply. I am getting from your email that with the current scons version the tool chain specifications are doable but not easy at all. Am I right?
>> I hope a new version with this functionality will come out soon.
> Yes. (This is actually more of a user-level question than developer;
> I've CCed scons-users -- see below.)
> Probably the simplest way to do it today is to use regular python code
> to figure out which compilers are installed on the system, and just
> build your tool list from that.
>> On Sep 24, 2012, at 9:25 AM, Gary Oberbrunner <garyo at oberbrunner.com> wrote:
>>> On Mon, Sep 24, 2012 at 9:12 AM, Ludmil T Zikatanov
>>> <ltzmultigrid at gmail.com> wrote:
>>>> I like scons model for software development, it is simple and quite powerful. However, I stumbled when I tried to write an SConstruct file that searches for "C" and "Fortran" compilers in an order prescribed by me. For example: assume that I have "icc", "gcc" and "gcc-mp-4.6" on a mac (all paths to the executables are in the scons path, so no problem finding each of these 3 tools).
>>>> Then I'd like to have scons to search for tools in the following order: check for "icc", if not found, then check for "gcc-mp-4.6" and if not found then fall back to "gcc" (or just go through the rest of the compilers that are default in the "tool specifications" as indicated on the scons man page).
>>>> Similar applies to Fortran compilers (or any other tools). I think it will be good to either include example in the man pages accomplishing the above "ordered search task" (if such example can be provided) or include this in future versions of scons (if it appeals to you).
>>> Hi Ludmil; this kind of thing is not easy to do with SCons today, but
>>> we are thinking about how to make tool chain specifications more
>>> flexible in a future version.
>>> Scons-dev mailing list
>>> Scons-dev at scons.org
>> Scons-dev mailing list
>> Scons-dev at scons.org
> Scons-users mailing list
> Scons-users at scons.org
More information about the Scons-users