comp.lang.ada
 help / color / mirror / Atom feed
* Question about GNAT project files.
@ 2012-02-26 19:48 Peter C. Chapin
  2012-02-26 20:15 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Peter C. Chapin @ 2012-02-26 19:48 UTC (permalink / raw)


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.

Thought #1: Create an empty "master" project that imports the three 
projects I mentioned above as subprojects. This doesn't work. As soon as 
I try to build something GPS tells me that my project (the master 
project) doesn't have any Ada sources. Perhaps I'm doing it wrong.

Thought #2: Make lib.grp my master and add "with ../tests/tests.gpr" and 
"with ../benchmarks/benchmarks.gpr" to it so that I can see and 
manipulate all three projects at once. This doesn't work either. My 
tests and benchmarks projects have a dependency on lib.gpr resulting in 
circular dependencies when I try include them in lib.gpr.

Thought #3: Ditch my tests and benchmarks projects and just add their 
sources, etc, to my lib.grp project (maybe rename lib.gpr). This would 
give me a project with two target executables and a library. I think 
this could work but I do like having the projects optionally independent 
too. Someone using the library could just "with lib.gpr" without pulling 
in all sorts of other stuff.

What is the "right" way to do this?

Peter



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-02-29 17:17 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox