From: "Peter C. Chapin" <PChapin@vtc.vsc.edu>
Subject: Re: Question about GNAT project files.
Date: Mon, 27 Feb 2012 21:02:46 -0500
Date: 2012-02-27T21:02:46-05:00 [thread overview]
Message-ID: <hfSdnUg7kIRPqNHSRVn_vwA@giganews.com> (raw)
In-Reply-To: <d9438b7a-5320-42cd-bee7-dd3299be5dff@w19g2000vbe.googlegroups.com>
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
next prev parent reply other threads:[~2012-02-28 2:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-26 19:48 Question about GNAT project files Peter C. Chapin
2012-02-26 20:15 ` Dmitry A. Kazakov
2012-02-26 22:18 ` Greg Moncreaff
2012-02-27 13:41 ` Peter C. Chapin
2012-02-28 16:59 ` Yannick Duchêne (Hibou57)
2012-02-28 18:10 ` AdaMagica
2012-02-28 18:14 ` Simon Wright
2012-02-27 13:08 ` Ludovic Brenta
2012-02-27 13:43 ` Peter C. Chapin
2012-02-27 15:27 ` Simon Wright
2012-02-28 2:02 ` Peter C. Chapin [this message]
2012-02-28 6:56 ` Phil Thornley
2012-02-29 0:04 ` Peter C. Chapin
2012-02-29 9:18 ` Phil Thornley
2012-02-29 14:51 ` Peter C. Chapin
2012-02-29 16:49 ` Phil Thornley
2012-02-29 17:17 ` Peter C. Chapin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox