comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: [GNAT] compiler options ignored for sources from ADA_INCLUDE_PATH
Date: Mon, 26 Aug 2013 08:37:41 +0100
Date: 2013-08-26T08:37:41+01:00	[thread overview]
Message-ID: <lyd2p0q4vu.fsf@pushface.org> (raw)
In-Reply-To: 88b6ef16-7473-44a8-95fa-1115be6eac2c@googlegroups.com

gautier_niouzes@hotmail.com writes:

> Le lundi 26 août 2013 03:22:14 UTC+2, Stephen Leake a écrit :
>
> [...]
> Thanks for the explanations.
>
>> If you want the same options (sounds like you do), create an 'options'
>> project file that just defines some variables, and use those variables
>> in the other project files.    
>
> There is a snag here. "The other project files" can be XMLAda and many others.
> XMLAda only depends on several project files:
> xmlada.gpr
> xmlada_dom.gpr
> xmlada_input.gpr
> xmlada_sax.gpr
> xmlada_schema.gpr
> xmlada_shared.gpr
> xmlada_unicode.gpr
> So I would need to to special versions of dozens of project files
> (xmlada2.gpr, ...) for having a reference to options.gpr ?
> Then have installation instructions for the users of my project
> regarding where to place those special project files ?
> Do changes in xmlada2.gpr etc. each time xmlada.gpr etc. are changing ?
> I seems a bit complicated (to be polite)...
> It's very fine when all projects are yours, but if you use many
> external projects, it is not practical.
> Thanks anyway for the explanations. I think I'll stick to
> ADA_INCLUDE_PATH and a main project and have a script to precompile
> those library items.

What are these special compiler options that mean you have to go to all
this trouble? ...

Anyway, if you're using a recent GNAT, consider external_as_list[1] in
your own project file:

   for Source_Dirs use (".") & external_as_list("ADA_SOURCE_PATH", ":");

(NB, *not* ADA_INCLUDE_PATH!)

The ":" would need to be ";" on Windows; I believe there's a trick using
a Windows-only environment variable that lets you determine this in the
project file.

[1] http://docs.adacore.com/gprbuild-docs/html/gprbuild_ug.html#External-Values


  reply	other threads:[~2013-08-26  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-25  7:02 [GNAT] compiler options ignored for sources from ADA_INCLUDE_PATH gautier_niouzes
2013-08-26  1:22 ` Stephen Leake
2013-08-26  6:42   ` gautier_niouzes
2013-08-26  7:37     ` Simon Wright [this message]
2013-08-26 11:21       ` gautier_niouzes
2013-08-26 19:21         ` briot.emmanuel
2013-08-27 12:42     ` Stephen Leake
replies disabled

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