diff options
author | Jed Barber <jjbarber@y7mail.com> | 2021-01-19 14:14:49 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2021-01-19 14:14:49 +1100 |
commit | 85b4f256794699c9360d9aa54901ab2ceeddd8d5 (patch) | |
tree | f8da0b00523b4e469b3d5540f457ac3999a6aeb0 | |
parent | cd1cd96162314e69ad75d0ac62ac1021c0bcf08f (diff) |
Project files now have optimized compile mode
-rw-r--r-- | examples.gpr | 12 | ||||
-rw-r--r-- | packrat.gpr | 12 |
2 files changed, 22 insertions, 2 deletions
diff --git a/examples.gpr b/examples.gpr index 2f63bc2..117886f 100644 --- a/examples.gpr +++ b/examples.gpr @@ -6,6 +6,11 @@ with "packrat"; project Examples is + type Mode_Type is ("debug", "release"); + + Mode : Mode_Type := external ("mode", "debug"); + + for Languages use ("Ada"); @@ -23,7 +28,12 @@ project Examples is package Compiler is - for Default_Switches ("Ada") use ("-gnaty4aAbcefhiklM100nprt"); + case Mode is + when "debug" => + for Switches ("Ada") use ("-gnaty4aAbcefhiklM100nprt"); + when "release" => + for Switches ("Ada") use ("-O3"); + end case; end Compiler; diff --git a/packrat.gpr b/packrat.gpr index c66f654..98dd071 100644 --- a/packrat.gpr +++ b/packrat.gpr @@ -6,6 +6,11 @@ with "directed_graph"; library project Packrat is + type Mode_Type is ("debug", "release"); + + Mode : Mode_Type := external ("mode", "debug"); + + for Languages use ("Ada"); @@ -17,7 +22,12 @@ library project Packrat is package Compiler is - for Default_Switches("Ada") use ("-gnaty4aAbcefhiklM100nprt"); + case Mode is + when "debug" => + for Switches ("Ada") use ("-gnaty4aAbcefhiklM100nprt"); + when "release" => + for Switches ("Ada") use ("-O3"); + end case; end Compiler; |