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
|
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
|
-
+
+
+
+
+
|
project Natools is
type Build_Type is ("Release", "Coverage");
type Build_Type is ("Release", "Coverage", "Profiling");
Mode : Build_Type := external ("MODE", "Release");
type Task_Safety is ("None", "Portable", "Intel");
-- Task-safe, portable, efficient: choose two
Safety : Task_Safety := external ("TASK_SAFETY", "None");
Prefix := "";
Extra_Switches := ();
case Mode is
when "Release" =>
Prefix := "";
when "Coverage" =>
Prefix := "coverage/";
when "Profiling" =>
Prefix := "profiling/";
end case;
-- Source_Dirs is left to default "."
for Source_Dirs use ("src", "generated");
for Object_Dir use Prefix & "obj";
for Exec_Dir use Prefix & "bin";
case Mode is
when "Release" =>
Extra_Switches := ("-O3");
when "Coverage" =>
Extra_Switches :=
("-g", "-O0", "-fprofile-arcs", "-ftest-coverage");
when "Profiling" =>
Extra_Switches := ("-O3", "-g", "-pg");
end case;
package Compiler is
for Default_Switches ("Ada") use
("-gnatafnovy",
-- a: assersions enabled
|