internal void EndProjectBuild (Project project, bool succeeded)
{
if (!buildStarted)
throw new Exception ("build isnt started currently");
Project top_project = currentlyBuildingProjectsStack.Pop ();
if (String.Compare (project.FullFileName, top_project.FullFileName) != 0)
throw new Exception (String.Format (
"INTERNAL ERROR: Project finishing is not the same as the one on top " +
"of the stack. Project: {0} Top of stack: {1}",
project.FullFileName, top_project.FullFileName));
if (currentlyBuildingProjectsStack.Count == 0 ||
String.Compare (top_project.FullFileName, currentlyBuildingProjectsStack.Peek ().FullFileName) != 0)
LogProjectFinished (top_project, succeeded);
if (currentlyBuildingProjectsStack.Count == 0) {
LogBuildFinished (succeeded);
buildStarted = false;
}
}