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
Error_Msg_Name_2 := Proj_Data.Name;
if Extends then
Error_Msg
(Project, In_Tree,
Continuation.all &
"shared library project %% cannot extend " &
"project %% that is not a library project",
Data.Location);
Continuation := Continuation_String'Access;
if Data.Library_Kind /= Static then
Error_Msg
(Project, In_Tree,
Continuation.all &
"shared library project %% cannot extend " &
"project %% that is not a library project",
Data.Location);
Continuation := Continuation_String'Access;
end if;
elsif Data.Library_Kind /= Static then
Error_Msg
......@@ -6846,7 +6848,7 @@ package body Prj.Nmsc is
-- inherit the Mains from the project we are extending.
if Mains.Default then
if Data.Extends /= No_Project then
if not Data.Library and then Data.Extends /= No_Project then
Data.Mains :=
In_Tree.Projects.Table (Data.Extends).Mains;
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