From: "Björn Lundin" <b.f.lundin@gmail.com>
Subject: Re: Raising "exception" in a .gpr file
Date: Fri, 13 Aug 2021 17:40:02 +0200 [thread overview]
Message-ID: <sf63oi$c1g$1@dont-email.me> (raw)
In-Reply-To: <3e9e65ca-75a8-4df9-813d-8b053ecedd9fn@googlegroups.com>
Den 2021-08-13 kl. 10:11, skrev mockturtle:
> On Friday, August 13, 2021 at 9:44:13 AM UTC+2, Dmitry A. Kazakov wrote:
>> There are many nice addition they could have, starting with predefined
>> variables for the host OS, host machine and a sane set of operations
>> defined on strings.
>
> I agree. With just few additions the project files would much more powerful and easier to use.
>
I autogenerate such a file via a tcl-script as part of calling make.
It has to be done at least once - GPS it uses the file as is
(they are on 1 line but Thunderbird thinks they are too long)
--This file is autogenerated - DO NOT EDIT
--contents is from ada -z and ada -Z and some environment variables
--generated 2021-06-21 19:21:34
project Environment is
for Source_Dirs use (); -- to avoid warnings about no source files in
THIS project
type Compiler_Version_Type is ("2015", "2016", "2017", "2018",
"4.9.2", "6.0.2", "7.1.1", "7.3.2", "7.4.1", "7.4.2", "7.4lts",
"7.4ltsw", "17.2", "19.0w", "19.1", "19.2", "20.1", "20.2", "8.2.0",
"9.3.0");
type OS_Version_Type is ("AIX_7.1", "AIX_7.2", "windows_6.2",
"windows_10.0", "Linux_x86_64", "Linux_aarch64");
type Database_Type is ("oracle_10", "oracle_11", "oracle_12",
"sqlserver", "oci", "odbc_oracle", "odbc_postgresql", "postgresql");
type OS_Architecture_Type is ("aix_ppc", "win_x86", "lnx_x64",
"win_x64", "lnx_a64");
type IPC_Type is ("classic", "pipe", "rabbitmq");
OS_Version : OS_Version_Type := "Linux_x86_64";
OS_Architecture : OS_Architecture_Type := "lnx_x64";
IPC : IPC_Type := "pipe";
Compiler_Version : Compiler_Version_Type := "20.2";
Database : Database_Type := "oci";
Database_Version := "12";
Source_Dir := "/usr2/wcs/some_project/source";
Target_Dir := "/usr2/wcs/some_project/target";
Ada_Library_Root :=
"/usr2/wcs/some_project/target/adalib";
Ada_Library_Global :=
"/usr2/wcs/some_project/target/adalib/global_gpr";
end Environment;
Environment is then withed by other gpr files and used as
with "environment";
...
project Global is
Target_Machine : Environment.OS_Version_Type :=
Environment.Os_Version;
Compiler_Version : Environment.Compiler_Version_Type :=
Environment.Compiler_Version;
Data_Base : Environment.Database_Type :=
Environment.Database;
IPC : Environment.IPC_Type := Environment.IPC;
...
when "Linux_x86_64" =>
case Database is
when "oci" => Database_Libs := ("-L" & SOMEPATHE & "/lib",
"-lclntsh", "-L" & SATTMATE_OCILIB & "/lib", "-locilib");
when "sqlserver" => Data_Base_Libs := ("-lodbc");
when "odbc_oracle" => Data_Base_Libs := ("-lodbc");
when "odbc_postgresql" => Data_Base_Libs := ("-lodbc");
when others => null;
end case;
Platform_Dependent_Compiler_Switches := ();
case IPC is
when "classic" | "pipe" =>
case RPC_Enabled is
when "false" => null;
when "true" =>
--
Björn
next prev parent reply other threads:[~2021-08-13 15:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 7:23 Raising "exception" in a .gpr file mockturtle
2021-08-13 7:44 ` Dmitry A. Kazakov
2021-08-13 8:11 ` mockturtle
2021-08-13 15:40 ` Björn Lundin [this message]
2021-08-15 16:00 ` Mark Lorenzen
2021-08-15 16:21 ` Britt
2021-08-16 13:13 ` Fabien Chouteau
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox