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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a02622021d090376,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: [GNAT 2006] Project file and conditional withing/linking Date: Thu, 08 Jun 2006 04:37:48 +0200 Message-ID: <4epgrmF1g33evU1@individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net b8N8KZ+wXGw+zhCN8yTcYAeKCWioj3cZt1tCuNk+SwNoqxGsk= User-Agent: KNode/0.10.2 Xref: g2news2.google.com comp.lang.ada:4707 Date: 2006-06-08T04:37:48+02:00 List-Id: Hello, I'm using a project file and, depending on some external variables, I want to include some library for linking or not. The library is defined in its own project file. The problem is that withing the library project causes its linker options to be added no matter what I try, and I'd like to remove these linker options (otherwise the library is always linked). Conditionally withing seems out of the question: the "with"s are to be at the top. I've tried overriding with for Gtkada.Linker'Default_Switches ("ada") use (); for Gtkada.Linker.Linker_Options use (); but both give syntax errors when trying to load the project file. Another try has been to completely override my project linker options with package Linker case Include_Gtk is when No => for Default_Switches ("ada") use (); for Linker_Options use (); but it seems the composition of options is done at a later stage so this doesn't affect previously withed projects. I could remove the withing and copy the switches to my project file, but I'd strongly prefer to keep using the stock installed library project file. For now I think I'll have to resort to have separate project files. Unless of course someone can enlighten me. Thanks in advance, A. Mosteo.