-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgnatcheck.gpr
42 lines (34 loc) · 1.05 KB
/
gnatcheck.gpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
with "libadalang";
with "liblkqllang";
with "gpr2";
project GNATcheck is
type Build_Mode_Type is ("dev", "prod");
Build_Mode : Build_Mode_Type := external
("BUILD_MODE", external ("LKQL_CHECKER_BUILD_MODE", "dev"));
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Build_Mode;
for Exec_Dir use "bin";
for Main use ("gnatcheck_main.adb");
package Binder is
case Build_Mode is
when "dev" =>
for Switches ("Ada") use ("-Es");
when others =>
null;
end case;
end Binder;
package Builder is
for Executable ("gnatcheck_main.adb") use "gnatcheck";
for Switches ("Ada") use ("-j0");
end Builder;
package Compiler is
Switches := ("-gnatyg", "-gnatwa", "-g", "-gnat2022");
case Build_Mode is
when "dev" =>
Switches := Switches & ("-O0", "-gnata", "-gnatwe");
when "prod" =>
Switches := Switches & ("-O2", "-gnatn2");
end case;
for Default_Switches ("Ada") use Switches;
end Compiler;
end GNATcheck;