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.ams.giganews.com!nntp.giganews.com!news.astraweb.com!border5.a.newsrouter.astraweb.com!xlned.com!feeder5.xlned.com!news.glorb.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: [GNAT] compiler options ignored for sources from ADA_INCLUDE_PATH References: <167c4830-c8f9-48d3-9850-b1772c2aa452@googlegroups.com> Date: Sun, 25 Aug 2013 20:22:14 -0500 Message-ID: <85k3j9fdq1.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) Cancel-Lock: sha1:IVRWwZ5eyZ7ZarD0Eipfh0Ya2Ss= MIME-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: ac4bd521aadc7eef2f13009402 X-Received-Bytes: 1860 Xref: number.nntp.dca.giganews.com comp.lang.ada:183133 Date: 2013-08-25T20:22:14-05:00 List-Id: gautier_niouzes@hotmail.com writes: > The title says most, except it is through a GNAT project (.gpr). > > More precisely, all compiled files land into the directory specified in > for Object_Dir use ...; > That's OK. > But the compiler options specified in > > package Compiler is > for Default_Switches ("ada") use (...); > end Compiler; > > are applied only to the sources found in > for Source_Dirs use (...); > and not to sources found in ADA_INCLUDE_PATH. As expected; the options specified in a project file apply to sources included in the project file. That way, you can have several project files, each with a list of sources and options. ADA_INCLUDE_PATH is a hold-over from pre-project-file times. > Bug ? Feature ? Feature. > Any way to have the compiler options applied to all sources ? Create a project file for the sources now in ADA_INCLUDE_PATH, and 'with' that project file from your main project file. 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. -- -- Stephe