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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d13bf824aeeb7e2b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.135.231 with SMTP id pv7mr13561028pbb.8.1330394579812; Mon, 27 Feb 2012 18:02:59 -0800 (PST) Path: h9ni17270pbe.0!nntp.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 27 Feb 2012 20:02:56 -0600 Date: Mon, 27 Feb 2012 21:02:46 -0500 From: "Peter C. Chapin" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Question about GNAT project files. References: In-Reply-To: Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-Lvkq2uTBibqGF7lGI6Qyr0dnUuRo1fZywYUaNpq+q3FIe3AHQo+EPPg2sfckwVFzKK0VeWNNHNccpI/!tUfahcAUKAK1vVfv+KkGJrkEZcykGyybjqY+KmkbZcGPQSTSG8OU33jdkfW3j9Y= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2956 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-02-27T21:02:46-05:00 List-Id: On 2012-02-27 08:08, Ludovic Brenta wrote: > I would keep the library project file unchanged and create one project > file for both the tests and the benchmark: > > with "lib.gpr"; > project Main is > for Source_Dirs use ("tests", "benchmarks"); > for Main use ("test", "benchmark"); > end Main; > > You load main.gpr in GPS. I set this up and it basically works fine... which is great. I do have one quirk though. My library has some SPARK components. When I load lib.gpr directly I can run the Examiner from inside GPS fine. It uses a command line that looks, in part, like spark -index_file=lib.idx ... This works because the SPARK index file (lib.idx) is in the same folder as the project file (lib.gpr). However, when I load my main project file as defined above and then try to run the Examiner on a file in the lib subproject it does not work. The command above is issued but the Examiner complains that it can't open the file lib.idx. I suspect that the working folder is the one containing main.gpr and not the one containing lib.gpr. It seems like, ideally, GPS should change to the folder of the subproject before issuing commands defined as external tools over that project. I don't see a way to make it do this. Perhaps this is a problem with the GPS/SPARK integration. Maybe I could fix it myself by tinkering with the Python files of the appropriate plug-in. However, before attempting something like that I thought I'd ask here to see if there's a better way. Right now to use SPARK on my library I need to load the lib.gpr file directly. That's not the end of the world, but it's also not everything I had hoped for. Peter