From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Q: Multiple GNAT project files and object directories Date: Tue, 9 Jul 2013 23:27:35 +0200 Organization: cbb software GmbH Message-ID: <1avdnsi6rm4p.124mo713tawnc.dlg@40tude.net> References: <062c95f8-445d-49f1-8bd2-76481f146cf7@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: xkOZ88C3T5fLavXpgyt3vA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:16232 Date: 2013-07-09T23:27:35+02:00 List-Id: 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