From 3ed0edef137c4b577646c35e0f5beddfb9f57555 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Thu, 8 May 2025 21:57:52 +1200 Subject: Improved project files with common switches, debug info, and optimisation --- example.gpr | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'example.gpr') diff --git a/example.gpr b/example.gpr index 9f8479e..e799be2 100644 --- a/example.gpr +++ b/example.gpr @@ -1,6 +1,9 @@ -with "asndfile"; +with + + "asndfile", + "proj/common"; project Example is @@ -8,23 +11,29 @@ project Example is for languages use ("Ada"); - for Source_Dirs use ("example"); for Object_Dir use "obj"; for Exec_Dir use "bin"; - for Main use ("file_info_example.adb", "read_example.adb", "virtual_io_example.adb"); + for Main use + ("file_info_example.adb", + "read_example.adb", + "virtual_io_example.adb"); package Builder is - for Executable("file_info_example.adb") use "info_example"; - for Executable("read_example.adb") use "read_example"; + for Executable("file_info_example.adb") use "info_example"; + for Executable("read_example.adb") use "read_example"; for Executable("virtual_io_example.adb") use "virtual_example"; - 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"); - end Compiler; + package Compiler renames Common.Compiler; + package Binder renames Common.Binder; + package Linker renames Common.Linker; end Example; -- cgit