comp.lang.ada
 help / color / mirror / Atom feed
From: ldries46 <bertus.dries@planet.nl>
Subject: Re: Checking for OS in gnatstudio project file(.gpr)
Date: Fri, 19 Jun 2020 10:01:55 +0200	[thread overview]
Message-ID: <5eec70f6$0$1460$e4fe514c@news.kpn.nl> (raw)
In-Reply-To: <5eeb50d9$0$1208$e4fe514c@news.kpn.nl>

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.

  parent reply	other threads:[~2020-06-19  8:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 11:32 Checking for OS in gnatstudio project file(.gpr) ldries46
2020-06-18 11:41 ` Mark Lorenzen
2020-06-18 12:13 ` Dmitry A. Kazakov
2020-06-18 16:44 ` Björn Lundin
2020-06-19  8:01 ` ldries46 [this message]
2020-06-19  9:11   ` ldries46
2020-06-19  9:11   ` Mark Lorenzen
2020-06-19 16:29     ` Simon Wright
2020-06-20  9:02       ` ldries46
2020-06-19 16:43 ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox