Commit 32ffda3f by Vincent Celier Committed by Arnaud Charlet

2008-05-27 Vincent Celier <celier@adacore.com>

	* prj-nmsc.adb:
	(Check_Library): Allow standard project to be extended as a static
	library project.
	(Get_Mains): Do not inherit attribute Main in an extending library
	project.

From-SVN: r135986
parent 52268145
...@@ -3851,13 +3851,15 @@ package body Prj.Nmsc is ...@@ -3851,13 +3851,15 @@ package body Prj.Nmsc is
Error_Msg_Name_2 := Proj_Data.Name; Error_Msg_Name_2 := Proj_Data.Name;
if Extends then if Extends then
Error_Msg if Data.Library_Kind /= Static then
(Project, In_Tree, Error_Msg
Continuation.all & (Project, In_Tree,
"shared library project %% cannot extend " & Continuation.all &
"project %% that is not a library project", "shared library project %% cannot extend " &
Data.Location); "project %% that is not a library project",
Continuation := Continuation_String'Access; Data.Location);
Continuation := Continuation_String'Access;
end if;
elsif Data.Library_Kind /= Static then elsif Data.Library_Kind /= Static then
Error_Msg Error_Msg
...@@ -6846,7 +6848,7 @@ package body Prj.Nmsc is ...@@ -6846,7 +6848,7 @@ package body Prj.Nmsc is
-- inherit the Mains from the project we are extending. -- inherit the Mains from the project we are extending.
if Mains.Default then if Mains.Default then
if Data.Extends /= No_Project then if not Data.Library and then Data.Extends /= No_Project then
Data.Mains := Data.Mains :=
In_Tree.Projects.Table (Data.Extends).Mains; In_Tree.Projects.Table (Data.Extends).Mains;
end if; end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment