mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
cdc83ffd16
* Add Ada client petstore samples - Add script to generate Ada client support with swagger-codegen - Add files to build the Ada sample - Add main program to use the generated client samples API and connect to the server to perform some operations * Add some description for the samples * Update the documentation to explain how to build, how to use the generated Ada client code
89 lines
2.4 KiB
Plaintext
89 lines
2.4 KiB
Plaintext
abstract project Config is
|
|
for Source_Dirs use ();
|
|
|
|
type Yes_No is ("yes", "no");
|
|
|
|
type Library_Type_Type is ("relocatable", "static");
|
|
|
|
type Mode_Type is ("distrib", "debug", "optimize", "profile");
|
|
Mode : Mode_Type := external ("MODE", "debug");
|
|
|
|
Coverage : Yes_No := External ("COVERAGE", "no");
|
|
Processors := External ("PROCESSORS", "1");
|
|
|
|
package Builder is
|
|
case Mode is
|
|
when "debug" =>
|
|
for Default_Switches ("Ada") use ("-g", "-j" & Processors);
|
|
when others =>
|
|
for Default_Switches ("Ada") use ("-g", "-O2", "-j" & Processors);
|
|
end case;
|
|
end Builder;
|
|
|
|
package compiler is
|
|
warnings := ("-gnatwua");
|
|
defaults := ("-gnat2012");
|
|
case Mode is
|
|
when "distrib" =>
|
|
for Default_Switches ("Ada") use defaults & ("-gnatafno", "-gnatVa", "-gnatwa");
|
|
|
|
when "debug" =>
|
|
for Default_Switches ("Ada") use defaults & warnings
|
|
& ("-gnata", "-gnatVaMI", "-gnaty3abcefhiklmnprstxM99");
|
|
|
|
when "optimize" =>
|
|
for Default_Switches ("Ada") use defaults & warnings
|
|
& ("-gnatn", "-gnatp", "-fdata-sections", "-ffunction-sections");
|
|
|
|
when "profile" =>
|
|
for Default_Switches ("Ada") use defaults & warnings & ("-pg");
|
|
end case;
|
|
|
|
case Coverage is
|
|
when "yes" =>
|
|
for Default_Switches ("ada") use Compiler'Default_Switches ("Ada") &
|
|
("-fprofile-arcs", "-ftest-coverage");
|
|
when others =>
|
|
end case;
|
|
end compiler;
|
|
|
|
package binder is
|
|
case Mode is
|
|
when "debug" =>
|
|
for Default_Switches ("Ada") use ("-E");
|
|
|
|
when others =>
|
|
for Default_Switches ("Ada") use ("-E");
|
|
|
|
end case;
|
|
end binder;
|
|
|
|
package linker is
|
|
case Mode is
|
|
when "profile" =>
|
|
for Default_Switches ("Ada") use ("-pg");
|
|
|
|
when "distrib" =>
|
|
for Default_Switches ("Ada") use ("-s");
|
|
|
|
when "optimize" =>
|
|
for Default_Switches ("Ada") use ("-Wl,--gc-sections");
|
|
|
|
when others =>
|
|
null;
|
|
end case;
|
|
|
|
case Coverage is
|
|
when "yes" =>
|
|
for Default_Switches ("ada") use Linker'Default_Switches ("ada") &
|
|
("-fprofile-arcs");
|
|
when others =>
|
|
end case;
|
|
end linker;
|
|
|
|
package Ide is
|
|
for VCS_Kind use "git";
|
|
end Ide;
|
|
|
|
end Config;
|