-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathskel.gpr
76 lines (61 loc) · 3.12 KB
/
skel.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
-- Common options for other projects
project Skel is
type Boolean is ("True", "False");
type Build_Type is ("Debug");
Build : Build_Type := External ("Build", "Debug");
for Languages use ();
package Compiler is
for Required_Switches ("Ada") use ("-gnat2012",
"-gnatwa", -- optional warnings from gnat
"-Wall", -- optional warnings from gcc
"-gnatwt", -- detect dead code
"-gnatwj", -- extra warnings
"-gnaty-s", -- Most style checks
-- "-gnatwe", -- Warnings as errors
-- "-fcallgraph-info=su,da", -- Stack use info
-- GPL 2015 and above only ^
"");
for Required_Switches ("C") use ("-Wall", "-Wextra", "-Wpedantic");
for Required_Switches ("C++") use ("-Wall", "-Wextra", "-Wpedantic");
case Build is
when "Debug" =>
for Default_Switches ("Ada") use ("-g",
"-O2",
"-gnato", -- Standard Ada overflow
"-fstack-check",
"-gnata", -- All assertions
"-gnateE", -- Extra range check info in exceptions
"-gnatf", -- full errors
-- "-gnatqQ", -- compile as much as possible even with errors
"-gnatVa", -- all validity checks (expensive, use Vd for default)
"");
for Default_Switches ("C") use ("-g", "-O2");
for Default_Switches ("C++") use ("-g", "-O2");
end case;
end Compiler;
package Binder is
for Default_Switches ("Ada") use ("-E", -- exception tracebacks
"-g", -- keep debug symbols? (Unsure)
-- "-r", -- restrictions that might be applied
"-static", -- static GNAT runtime
"");
end Binder;
package Linker is
for Default_Switches ("Ada") use ("-g");
end Linker;
package Builder is
for Default_Switches ("Ada") use ("-g", "-j3");
end Builder;
package Pretty_Printer is
for Default_Switches ("Ada") use ("-A1", "-A2", "-A3", "-A4");
end Pretty_Printer;
package Naming is
for Specification_Suffix ("C") use ".h";
for Implementation_Suffix ("C") use ".c";
for Specification_Suffix ("C++") use ".hh";
for Implementation_Suffix ("C++") use ".cc";
for Specification_Suffix ("Changelog") use "changelog";
for Specification_Suffix ("Project file") use ".gpr";
for Specification_Suffix ("Python") use ".py";
end Naming;
end Skel;