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,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,12da20627e3e7424 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: Compiler switches for directory in GNAT project files Date: Sat, 27 Aug 2011 21:34:32 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <6e8c14b6-efab-44b3-b857-252bfd63744d@n12g2000yqh.googlegroups.com> Reply-To: anon@anon.org NNTP-Posting-Host: i+1oI+ox/w6CMwYdRyGPJw.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: g2news1.google.com comp.lang.ada:20712 Date: 2011-08-27T21:34:32+00:00 List-Id: There asre two ways: You can use the "Case" statement if you use an external/internal variable type SRC_Type is ( "default", "easy", "advance" ) ; -- SRC : SRC_Type := external ( "SRC", "default" ) ; case SRC is when "default" => for Source_Files use ( "libraries_1.adb", "print_1.adb", "environment_1.ads" ) ; when "easy" => for Source_Files use ( "libraries_2.adb", "print_1.adb", "environment_2.ads" ) ; when "advance" => for Source_Files use ( "libraries_3.adb", "print_2.adb", "environment_1.ads" ) ; end case; -- -- or you can use the "for Swiches" statement -- package Compiler is for Default_Switches ( "Ada" ) use ( "-gnat95" ) ; -- default 95 specs -- for Switches ( "Program_1.adb" ) use ( "-gnat05" ) ; -- Ada 2005 specs for Switches ( "Program_2.adb" ) use ( "-gnat12" ) ; -- using Ada 2012 end Compiler ; In <6e8c14b6-efab-44b3-b857-252bfd63744d@n12g2000yqh.googlegroups.com>, =?ISO-8859-1?Q?Bj=F6rn?= writes: >I have a number of source files in a GNAT project which have been >automatically generated. I want to compile these source files with >different compiler switches from the rest of the project (e.g. less >warnings). > >All of the automatically generated files are located in one single >folder. Up until now I've specified them one by one in the project >file: for Switches ("foo.adb") use ... However, the list of specified >files have now grown well over a hundred. > >Is there a way to specify specific compiler switches for all files >contained in a specific directory in GNAT project files? > >/Bj=F6rn