-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzoneinfo_shared_config.gpr
More file actions
114 lines (104 loc) · 5.25 KB
/
zoneinfo_shared_config.gpr
File metadata and controls
114 lines (104 loc) · 5.25 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
-- ==========================================================================
-- Shared Configuration for zoneinfo Library
-- ==========================================================================
-- Copyright (c) 2025 Michael Gardner, A Bit of Help, Inc.
-- SPDX-License-Identifier: BSD-3-Clause
-- See LICENSE file in the project root.
-- ==========================================================================
-- Purpose:
-- Abstract project providing common compiler, binder, and builder settings
-- for all sub-projects (domain, application, infrastructure, api)
--
-- Usage:
-- with "../../zoneinfo_shared_config.gpr";
-- library project My_Project is
-- package Compiler renames Zoneinfo_Shared_Config.Compiler;
-- end My_Project;
-- ==========================================================================
abstract project Zoneinfo_Shared_Config is
-- ==========================================================================
-- Compiler Package: Ada 2022 Standards and Best Practices
-- ==========================================================================
package Compiler is
-- Common switches applied to all build modes
Common_Switches := (
"-gnat2022", -- Ada 2022 mode
"-gnatwa", -- All warnings
"-gnatw.Y", -- Disable warnings from system units
"-gnatwl", -- Elaboration warnings
"-gnatwu", -- Unused entities warnings
"-gnatw.u", -- Unreferenced entities
"-gnatw.r", -- Redundant constructs
"-gnatw.k", -- Variable could be constant
"-gnatw.m", -- Variable assigned but never read
"-gnatw.o", -- Modified but unreferenced out parameters
"-gnatw.X", -- Disable warnings on local exception propagation
"-gnatf", -- Full error messages
-- Style checks (Ada Quality and Style Guide)
"-gnatyy", -- Enable default style checks
"-gnaty3", -- Check indentation of 3 spaces
"-gnatya", -- Check attribute casing
"-gnatyb", -- Check blanks at end of lines
"-gnatyc", -- Check comment format
"-gnatyd", -- Check no DOS line terminators
"-gnatye", -- Check end labels
"-gnatyf", -- Check form feeds/vertical tabs
"-gnatyh", -- Check horizontal tabs
"-gnatyi", -- Check if-then layout
"-gnatyk", -- Check keyword casing
"-gnatyl", -- Check layout
"-gnatym", -- Check line length <= 79 (overridden by -gnatyM120)
"-gnatyn", -- Check casing of entities in Standard
"-gnatyp", -- Check pragma casing
"-gnatyr", -- Check references
"-gnatys", -- Check separate specs
"-gnatyt", -- Check token spacing
"-gnatyu", -- Check unnecessary blank lines
"-gnatyx", -- Check extra parentheses
"-gnatyM120", -- Maximum line length of 120 characters
"-gnatyN", -- Check casing of predefined identifiers
"-gnatyO", -- Check overriding indicators
"-gnatyS", -- Check no statements on same line as THEN or ELSE
"-gnatW8" -- UTF-8 encoding
);
for Default_Switches ("Ada") use Common_Switches & (
"-g", -- Debug info
"-gnatVa", -- All validity checks
"-gnateE", -- Extra info in exceptions
"-gnata", -- Enable assertions and contracts
"-gnatU", -- Tag uninitialized scalars
"-gnatd.n", -- Activate front-end inlining
"-gnatwe" -- Warnings as errors
);
end Compiler;
-- ==========================================================================
-- Binder Package: Runtime Configuration
-- ==========================================================================
package Binder is
for Default_Switches ("Ada") use (
"-Es", -- Symbolic traceback
"-E" -- Store tracebacks in exceptions
);
end Binder;
-- ==========================================================================
-- Builder Package: Build Process Configuration
-- ==========================================================================
package Builder is
for Default_Switches ("Ada") use (
"-j0", -- Use all available cores (0 = auto-detect)
"-s" -- Recompile if compiler switches change
);
end Builder;
-- ==========================================================================
-- Format Package: Code Formatting Configuration
-- ==========================================================================
package Format is
for Configuration use ".gnatformat.yaml";
end Format;
-- ==========================================================================
-- Documentation Package: API Documentation
-- ==========================================================================
package Documentation is
for Documentation_Dir use "docs/api";
end Documentation;
end Zoneinfo_Shared_Config;