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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d13bf824aeeb7e2b,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.132.69 with SMTP id os5mr2039750pbb.6.1330285748233; Sun, 26 Feb 2012 11:49:08 -0800 (PST) Path: h9ni12416pbe.0!nntp.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 26 Feb 2012 13:49:05 -0600 Date: Sun, 26 Feb 2012 14:48:56 -0500 From: "Peter C. Chapin" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Question about GNAT project files. Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-iwVsl6EMoGJoTMBUeVfyF8pnBYCxuOwQOpirlNErFy3gcHtHCxqAVv8k4QHoFIf6IhItl6KrbmQMa2G!OuQJA7sXIwrJOfPYB+xJ8iTgO8Kcm/J2Fyjfs8crZedxIX9+ogXMDH3B+mZu9CI= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-02-26T14:48:56-05:00 List-Id: I have a library described by a project file, say lib.gpr. I also have a test program that exercises the library described by a different project file tests.gpr. Finally I have a benchmark program that does speed tests of the library described by a project file benchmarks.gpr. This is fine but it's a pain having three separate projects. Typically if I change the library I also want to update the tests and benchmarks. I'd like to do all that from a single instance of GPS. Thought #1: Create an empty "master" project that imports the three projects I mentioned above as subprojects. This doesn't work. As soon as I try to build something GPS tells me that my project (the master project) doesn't have any Ada sources. Perhaps I'm doing it wrong. Thought #2: Make lib.grp my master and add "with ../tests/tests.gpr" and "with ../benchmarks/benchmarks.gpr" to it so that I can see and manipulate all three projects at once. This doesn't work either. My tests and benchmarks projects have a dependency on lib.gpr resulting in circular dependencies when I try include them in lib.gpr. Thought #3: Ditch my tests and benchmarks projects and just add their sources, etc, to my lib.grp project (maybe rename lib.gpr). This would give me a project with two target executables and a library. I think this could work but I do like having the projects optionally independent too. Someone using the library could just "with lib.gpr" without pulling in all sorts of other stuff. What is the "right" way to do this? Peter