-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgpr2.gpr
67 lines (52 loc) · 1.93 KB
/
gpr2.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
--
-- Copyright (C) 2019-2024, AdaCore
--
-- SPDX-License-Identifier: Apache-2.0
--
with "gnatcoll_core";
with "gnatcoll_iconv";
with "gnatcoll_gmp";
with "xmlada";
library project GPR2 extends "shared.gpr" is
type Bool is ("true", "false");
Is_Externally_Built : Bool := external ("EXTERNALLY_BUILT", "false");
for Externally_Built use Is_Externally_Built;
for Languages use ("Ada", "C");
for Source_Dirs use ("src/lib",
"src/build",
"src/private",
Build_Root & "/kb",
"langkit/gen/src");
for Library_Name use "gpr2";
for Object_Dir use Build_Root & "/" & Build & "/obj-" & Library_Type;
for Library_Dir use Build_Root & "/" & Build & "/lib-" & Library_Type;
for Library_Kind use Library_Type;
--------------
-- Compiler --
--------------
Langkit_Parser_Options := ("-g");
package Compiler extends Shared.Compiler is
case Build is
when "debug" | "gnatcov" =>
Langkit_Parser_Options := Langkit_Parser_Options & ("-O0");
when "release_checks" =>
Langkit_Parser_Options := Langkit_Parser_Options & ("-Ofast");
when "release" =>
Langkit_Parser_Options := Langkit_Parser_Options & ("-Ofast");
end case;
-- Langkit parser
for Switches ("gpr_parser-*") use Langkit_Parser_Options & ("-gnatws");
for Switches ("gpr_parser_*") use Langkit_Parser_Options & ("-gnatws");
for Switches ("gpr_parser.*") use Langkit_Parser_Options & ("-gnatws");
for Switches ("gpr_parser-gdb.c") use Langkit_Parser_Options;
-- generated knowledge base
for Switches ("gpr2-kb-embedded.adb") use
Compiler'Default_Switches ("Ada") & ("-gnatws", "-gnatyN");
end Compiler;
--------------
-- Coverage --
--------------
package Coverage is
for Excluded_Units use ("gpr_parser*");
end Coverage;
end GPR2;