-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsettings.gpr
94 lines (74 loc) · 2.56 KB
/
settings.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
abstract project Settings is
type Build_Type is ("Debug", "Release", "Profile");
Build : Build_Type := external ("PRJ_BUILD", "Debug");
type Target_Type is ("Windows", "Windows_NT", "Linux", "UNIX", "OSX", "FreeBSD");
Build_Target : Target_Type := external ("PRJ_TARGET", "UNIX");
Obj_Dir := Settings'Project_Dir & "obj";
Exe_Dir := Settings'Project_Dir & "bin";
Lib_Dir := Settings'Project_Dir & "lib";
for Create_Missing_Dirs use "True";
--------------
-- Compiler --
--------------
Common_Options := ("-gnaty3abcefhiklM120nOprsStu", "-gnat2012", "-gnatW8", "-gnatU");
-- Common options used for the build modes
Debug_Options := ("-g", "-gnata", "-gnatq", "-gnatQ", "-gnatw.eH.YD.N", "-gnatVaep", "-gnato",
"-fstack-check", "-gnatf", "-gnateE", "-gnateF", "-Wall");
Release_Options := ("-O2", "-gnatp", "-gnatn");
package Compiler is
case Build is
when "Debug" =>
for Default_Switches ("Ada") use Common_Options & Debug_Options;
for Local_Configuration_Pragmas use "pragma_debug.adc";
when "Release" =>
for Default_Switches ("Ada") use Common_Options & Release_Options;
when "Profile" =>
for Default_Switches ("Ada") use Common_Options & ("-g", "-pg");
end case;
end Compiler;
------------
-- Binder --
------------
package Binder is
for Default_Switches ("Ada") use ("-Es");
end Binder;
------------
-- Linker --
------------
package Linker is
case Build is
when "Debug" =>
for Default_Switches ("Ada") use ("-g");
when "Profile" =>
for Default_Switches ("Ada") use ("-g", "-pg");
when others =>
null;
end case;
case Build_Target is
when "OSX" =>
for Default_Switches ("Ada")
use Linker'Default_Switches ("Ada") & ("-Wl,-no_pie");
when others =>
null;
end case;
end Linker;
--------------------
-- Pretty Printer --
--------------------
package Pretty_Printer is
for Default_Switches ("Ada") use ("-M120", "-W8", "--par_threshold=1", "--comments-unchanged");
end Pretty_Printer;
-------------
-- Builder --
-------------
package Builder is
for Switches ("ada") use ("-j0", "-k");
end Builder;
---------
-- IDE --
---------
package IDE is
for Default_Switches ("adacontrol") use ("-f", Settings'Project_Dir & "rules/gnoga.aru", "-S", "1");
for VCS_Kind use "git";
end IDE;
end Settings;