aboutsummaryrefslogtreecommitdiff
path: root/example.gpr
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-05-08 15:23:07 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2025-05-08 15:23:07 +1200
commita75042055c9045d310c3ff1d30607be736e9cf5f (patch)
tree5bd2ea86948410b6440585a4e5742ea721c5dd8f /example.gpr
parent87e42e46a5d898698ad5cbcd71b3877d2c319084 (diff)
Improved project files with common switches, debug info, and optimisation
Diffstat (limited to 'example.gpr')
-rw-r--r--example.gpr35
1 files changed, 22 insertions, 13 deletions
diff --git a/example.gpr b/example.gpr
index c702ae7..5129612 100644
--- a/example.gpr
+++ b/example.gpr
@@ -1,6 +1,9 @@
-with "aao";
+with
+
+ "aao",
+ "proj/common";
project Example is
@@ -8,25 +11,31 @@ project Example is
for languages use ("Ada", "C");
-
for Source_Dirs use ("example");
- for Object_Dir use "obj";
- for Exec_Dir use "bin";
- for Main use ("aao_example.adb", "ao_example.c", "info_list.adb", "format_options.adb");
+ for Object_Dir use "obj";
+ for Exec_Dir use "bin";
+ for Main use
+ ("aao_example.adb",
+ "ao_example.c",
+ "info_list.adb",
+ "format_options.adb");
package Builder is
- for Executable("aao_example.adb") use "ada_example";
- for Executable("ao_example.c") use "c_example";
- for Executable("info_list.adb") use "info_list";
+ for Executable("aao_example.adb") use "ada_example";
+ for Executable("ao_example.c") use "c_example";
+ for Executable("info_list.adb") use "info_list";
for Executable("format_options.adb") use "format_options";
- end Builder;
+ for Default_Switches ("Ada") use
+ Common.Builder'Default_Switches ("Ada");
+ for Global_Compilation_Switches ("Ada") use
+ Common.Builder'Global_Compilation_Switches ("Ada");
+ end Builder;
- package Compiler is
- for Default_Switches("Ada") use ("-gnaty4aAbcefhiklM100nprt");
- for Default_Switches("C") use ("-Wall", "-Wextra");
- end Compiler;
+ package Compiler renames Common.Compiler;
+ package Binder renames Common.Binder;
+ package Linker renames Common.Linker;
end Example;