From: "Peter C. Chapin" <PChapin@vtc.vsc.edu>
Subject: Question about GNAT project files.
Date: Sun, 26 Feb 2012 14:48:56 -0500
Date: 2012-02-26T14:48:56-05:00 [thread overview]
Message-ID: <Cc6dnSeN8twuEdfS4p2dnAA@giganews.com> (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
next reply other threads:[~2012-02-26 19:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-26 19:48 Peter C. Chapin [this message]
2012-02-26 20:15 ` Question about GNAT project files 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox