Files

73 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2020-04-24 09:45:24 -05:00
project Stack_Dev is
for Languages use ("Ada");
for Exec_Dir use ".";
package Compiler is
for Default_Switches ("ada") use
("-gnatwa", -- enable additional warnings
"-g", -- enable debugging info, in case
"-gnato11", -- enable overflow checks everywhere, which is also the default
"-gnata"); -- enable assertions
end Compiler;
package Builder is
for Switches ("ada") use ("-g");
end Builder;
type Adoption_Levels is ("Ada", "Stone", "Bronze", "Silver", "Gold", "Platinum");
2020-04-24 09:45:24 -05:00
Adoption_Level : Adoption_Levels := external ("Adoption_Level", "Platinum");
for Object_Dir use "objs/" & Adoption_Level;
2023-03-25 14:46:25 -05:00
2020-04-24 09:45:24 -05:00
-- set main program
case Adoption_Level is
when "Ada" | "Stone" | "Bronze" | "Silver" =>
2020-04-24 09:45:24 -05:00
for Main use ("demo_aorte.adb");
2023-03-25 14:46:25 -05:00
when "Gold" | "Platinum" =>
2020-04-24 09:45:24 -05:00
for Main use ("demo_gold.adb");
end case;
2023-03-25 14:46:25 -05:00
-- set source dirs
case Adoption_Level is
when "Ada" =>
2023-03-25 14:46:25 -05:00
for Source_Dirs use ("source/mains", "source/Ada");
when "Stone" =>
for Source_Dirs use ("source/mains", "source/Stone");
when "Bronze" =>
for Source_Dirs use ("source/mains", "source/Bronze");
when "Silver" =>
for Source_Dirs use ("source/mains", "source/Silver");
when "Gold" =>
for Source_Dirs use ("source/mains", "source/Gold");
when "Platinum" =>
for Source_Dirs use ("source/mains", "source/Platinum");
2023-03-25 14:46:25 -05:00
end case;
-- set GNATprove mode switch
2020-04-24 09:45:24 -05:00
Mode_Switch := "";
case Adoption_Level is
when "Ada" =>
2020-04-24 09:45:24 -05:00
Mode_Switch := "--mode=check";
2023-03-25 14:46:25 -05:00
when "Stone" =>
2020-04-24 09:45:24 -05:00
Mode_Switch := "--mode=check_all";
2023-03-25 14:46:25 -05:00
when "Bronze" =>
Mode_Switch := "--mode=bronze";
2020-04-24 09:45:24 -05:00
when "Silver" | "Gold" | "Platinum" =>
Mode_Switch := "--mode=all";
2023-03-25 14:46:25 -05:00
end case;
2020-04-24 09:45:24 -05:00
-- set prover switches
package Prove is
2023-03-25 14:46:25 -05:00
for Proof_Switches ("Ada") use
2020-04-24 09:45:24 -05:00
("--level=4") & Mode_Switch;
2023-03-25 14:46:25 -05:00
end Prove;
2020-04-24 09:45:24 -05:00
end Stack_Dev;