diff options
-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; |