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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: [GNAT] compiler options ignored for sources from ADA_INCLUDE_PATH Date: Mon, 26 Aug 2013 08:37:41 +0100 Organization: A noiseless patient Spider Message-ID: References: <167c4830-c8f9-48d3-9850-b1772c2aa452@googlegroups.com> <85k3j9fdq1.fsf@stephe-leake.org> <88b6ef16-7473-44a8-95fa-1115be6eac2c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx05.eternal-september.org; posting-host="96da1f21b1594e5db25a66d953e76ba2"; logging-data="18300"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18R9eIHRSBWju/BlkruO1tqOyggYdXsETk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:RcFrLlRolnCg3ZTh2YLNVUwxjvo= sha1:8th21EdKFPS+0GyAnXfS+4aWQ3o= X-Original-Bytes: 2926 Xref: number.nntp.dca.giganews.com comp.lang.ada:183135 Date: 2013-08-26T08:37:41+01:00 List-Id: 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