From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ip-172-31-74-118.ec2.internal 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: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!feeder1.feed.usenet.farm!feed.usenet.farm!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost2.xs4all.net!news.kpn.nl!not-for-mail Subject: Re: Checking for OS in gnatstudio project file(.gpr) Newsgroups: comp.lang.ada References: <5eeb50d9$0$1208$e4fe514c@news.kpn.nl> From: ldries46 Date: Fri, 19 Jun 2020 10:01:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <5eeb50d9$0$1208$e4fe514c@news.kpn.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: nl Message-ID: <5eec70f6$0$1460$e4fe514c@news.kpn.nl> NNTP-Posting-Host: 215b7436.news.kpn.nl X-Trace: G=YdShN4PS,C=U2FsdGVkX19guWlPwNS/jTVbOtAH0SViD7gfQQVsRETJshxwV1j4iSfCfF0XbPEZGpwTHcx3QPyvKRwN6CpYyDLe15z+ZspnG/CqLZMXhxY= X-Complaints-To: abuse@kpn.nl Xref: reader01.eternal-september.org comp.lang.ada:59126 List-Id: At this point I found within my environment variables on Windows: OS=Windows_NT so I created the following in my .gpr file (I have not yest looked in Linux, perhaps I shoud add OS=Linux there)    type OS_Kind is       ("Windows_NT", "Linux");    OS : OS_Kind := external("OS", "Windows_NT");    case OS is       when "Windows_NT" =>          for Object_Dir use "./build";          for Exec_Dir   use ".";       when "Linux" =>          for Object_Dir use "./build";          for Exec_Dir   use ".";          for Casing     use "mixedcase";    end case; The problem now is the casing, that seems not to be available on Windows. In Linux it looks like I need it because the standard there is "lowercase" Is there an overall .gpr file that all project use in which I can add or change that ? Op 18-6-2020 om 13:32 schreef ldries46: > I em in neede for a possibility to check within a .gpr file which > operating system is runnung. Is there a way to do that? So I can use > the same project file without changing  the .gpr file when compiling a > program on different OS'ses.