comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Question about GNAT project files.
Date: Sun, 26 Feb 2012 21:15:49 +0100
Date: 2012-02-26T21:15:49+01:00	[thread overview]
Message-ID: <qiacs5vxq1gz.jm0450zidnjv.dlg@40tude.net> (raw)
In-Reply-To: Cc6dnSeN8twuEdfS4p2dnAA@giganews.com

On Sun, 26 Feb 2012 14:48:56 -0500, Peter C. Chapin wrote:

> I have a library described by a project file, say lib.gpr. I also have a 
> test program that exercises the library described by a different project 
> file tests.gpr. Finally I have a benchmark program that does speed tests 
> of the library described by a project file benchmarks.gpr.
>
> This is fine but it's a pain having three separate projects. Typically 
> if I change the library I also want to update the tests and benchmarks. 
> I'd like to do all that from a single instance of GPS.

with "../lib.gpr";
project Lib.Tests is
   for Main use (<list of tests>);
   package Compiler renames Lib.Compiler;
   package Binder renames Lib.Binder;
   package Builder renames Lib.Builder;
   package Linker renames Lib.Linker;
end Lib.Tests;

P.S. Lib is not really a library, rather a project containing the source
files of the library. For a true library, you would need a separate project
specially for building it static, dynamic, debug, release. I usually
generate this from a script because it depends on the target due to various
packaging policies.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2012-02-26 20:15 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 [this message]
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
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