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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,8fa98f4202df5e1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer03.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 Newsgroups: comp.lang.ada Subject: Re: gnat Project files References: <316f58b2-1151-4124-a416-e0345be66474@x15g2000vbr.googlegroups.com> From: Stephen Leake Date: Thu, 05 Nov 2009 05:22:50 -0500 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:XhkB6LqrBgWk2odB4dFxgM4xPds= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: de34d4af2a75ee197caa723473 Xref: g2news2.google.com comp.lang.ada:8991 Date: 2009-11-05T05:22:50-05:00 List-Id: "RasikaSrinivasan@gmail.com" writes: > I have a "common.gpr" for a number of projects. I was hoping I could > define Exec_Dir, Object_Dir etc in just in the common.gpr. But it does > not appear to be inherited in the lower level gprs. Am I missing > something? Yes :). One use of project files is to keep separate sets of sources and build directories for each project, so higher-level projects can share lower-level projects. For example, I have this directory structure: GDS -- top level sal -- math and other utilities build x86_gnu_windows -- native Windows x86_gnu_lynx_linux -- cross target Linux to Lynx x86_gnu_linux -- native Linux source -- *.ad[sb] common -- core GDS stuff build x86_gnu_windows -- native Windows x86_gnu_lynx_linux -- cross target Linux to Lynx x86_gnu_linux -- native Linux source -- *.ad[sb] smm -- music manager build x86_gnu_windows -- native Windows Each x86_* directory has a project file, and local obj subdirectory. Exec_Dir has the default value of the x86_* directory; that's where test executables get built. smm and common both use sal, but they have nothing else in common. The compiler only has to compile sal once, when compiling smm or common. You can also set compiler options in a common gpr file, and then use renames on the compiler package: project Shared is package Compiler is for Default_Switches ("Ada") use ("-gnat05"); -- other switches end Compiler; end Shared; with "shared"; project Common is package Compiler renames Shared.Compiler; end Common; -- -- Stephe