Towards declared executables

This commit is contained in:
A
2018-02-23 19:30:26 +01:00
parent edc1a14ae2
commit 7800a5e27b
6 changed files with 43 additions and 3 deletions
+24
View File
@@ -1,7 +1,31 @@
with Alire.Properties.Labeled;
with GNAT.IO; -- To keep preelaborable
package body Alire.Releases is
-----------------
-- Executables --
-----------------
function Executables (R : Release) return Utils.String_Vector is
begin
return Exes : Utils.String_Vector do
for P of R.Props loop
if P in Properties.Labeled.Label'Class then
declare
use all type Properties.Labeled.Labels;
Label : Properties.Labeled.Label renames Properties.Labeled.Label (P);
begin
if Label.Name = Executable then
Exes.Append (Label.Value);
end if;
end;
end if;
end loop;
end return;
end Executables;
-----------
-- Print --
-----------