comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Q: Multiple GNAT project files and object directories
Date: Tue, 9 Jul 2013 23:27:35 +0200
Date: 2013-07-09T23:27:35+02:00	[thread overview]
Message-ID: <1avdnsi6rm4p.124mo713tawnc.dlg@40tude.net> (raw)
In-Reply-To: 062c95f8-445d-49f1-8bd2-76481f146cf7@googlegroups.com

On Tue, 9 Jul 2013 13:44:26 -0700 (PDT), gautier_niouzes@hotmail.com wrote:

> With
>    for Object_Dir use "obj";
> only the object files for the project are put into it.
> The "with"-ed projects have their own Object_Dir's, and their object files
> appear there. Fair enough.
> Now I have a more complicated situation: a main project with different
> build modes. So the Object_Dir depends on this build mode:
>    case Build_Mode is
>       when "Debug" =>
>          for Object_Dir use "../obj/debug";
>       when "Fast" =>
>          for Object_Dir use "../obj/fast";
>       when "Profiling" =>
>          for Object_Dir use "../obj/profiling";
>    end case;
> The snag is: the "with"-ed projects do not know about that and use only
> their own single Object_Dir. GNAT is smart enough to recompile everything
> in the "with"-ed projects upon a build mode change. But it makes the build
> very long each time a mode is changed. At worst we would have different
> sets of compiler options in the object files to be linked.
> TIA for any clue...

I am using this technique:

with Foo;
project Bar is
   for Object_Dir use ".../.../" & Foo'Object_Dir;
                             ^^^^^ Some path to get to the Foo's directory
from the Bar's directory.

P.S. It would be nice if GPS had a syntax for attributes treated less
literally. I.e. for Foo's Object_Dir meant as a directory rather than mere
a string.

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

  reply	other threads:[~2013-07-09 21:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-09 20:44 Q: Multiple GNAT project files and object directories gautier_niouzes
2013-07-09 21:27 ` Dmitry A. Kazakov [this message]
2013-07-09 21:42 ` Simon Wright
2013-07-10  8:00   ` gautier_niouzes
2013-07-10  8:28   ` Pascal Obry
2013-07-10 12:37     ` Simon Wright
2013-07-10 13:34       ` gautier_niouzes
2013-07-10 17:44         ` J-P. Rosen
2013-07-10 19:45           ` Simon Wright
2013-07-11  3:45           ` gautier_niouzes
2013-07-10 19:53         ` Simon Wright
2013-07-11  4:21           ` gautier_niouzes
replies disabled

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