From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,15d78a51b0d35cec X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!f1g2000prb.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: architecture-independent GNAT project files? Date: Tue, 28 Apr 2009 13:56:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: <53e0f35c-2ed9-485c-b76d-c7f34a0268a9@f1g2000prb.googlegroups.com> References: <75l5ceF18samiU1@mid.individual.net> <75mlktF1979j6U1@mid.individual.net> <1xrnblwdskgjg$.1v3turpillxav$.dlg@40tude.net> NNTP-Posting-Host: 82.20.239.89 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1240952185 16979 127.0.0.1 (28 Apr 2009 20:56:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 28 Apr 2009 20:56:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f1g2000prb.googlegroups.com; posting-host=82.20.239.89; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5600 Date: 2009-04-28T13:56:24-07:00 List-Id: On Apr 28, 8:24=A0am, "Dmitry A. Kazakov" wrote: > Hmm, I see no obvious way to do it. In my case there are several GNAT > compilers installed. The project variable Platform chooses the compiler a= s > well. For example, I have: > > =A0 =A0package Ide is > =A0 =A0 =A0 case Platform is > =A0 =A0 =A0 =A0 =A0when "x86_Windows" =3D> > =A0 =A0 =A0 =A0 =A0 =A0 for Gnatlist use "gnatls"; > =A0 =A0 =A0 =A0 =A0 =A0 for Gnat use "gnat"; > =A0 =A0 =A0 =A0 =A0 =A0 for Compiler_Command ("ada") use "gnatmake"; > =A0 =A0 =A0 =A0 =A0 =A0 for Debugger_Command use "gdb"; > =A0 =A0 =A0 =A0 =A0when "x86_VxWorks" =3D> > =A0 =A0 =A0 =A0 =A0 =A0 for Gnatlist use "i586-wrs-vxworks-gnatls"; > =A0 =A0 =A0 =A0 =A0 =A0 for Gnat use "i586-wrs-vxworks-gnat"; > =A0 =A0 =A0 =A0 =A0 =A0 for Compiler_Command ("ada") use "i586-wrs-vxwork= s-gnatmake"; > =A0 =A0 =A0 =A0 =A0 =A0 for Debugger_Command use "i586-wrs-vxworks6-gdb"; > =A0 =A0 =A0 end case; > =A0 =A0end Ide; > > This changes gnatlist, gnat, gnatmake, everything... If you say $ gnatmake -Pdmitry.gpr -XPlatform=3Dx86_VxWorks does it swap then? When we wrote our Project files we weren't aware of Compiler_Command, in fact it may not even have been available, so we have to name the compiler as well as setting the variables: $ i586-wrs-vxworks6-gnatmake -Pdmitry.gpr -XPlatform=3Dx86_VxWorks Of course, once the makefiles are set up it doesn't make a heap of difference.