lazbuild: fixed repeated build project clean: save project state file before compiling too

git-svn-id: trunk@36724 -
This commit is contained in:
mattias 2012-04-11 09:00:32 +00:00
parent 74310d0da5
commit 2039c21296

View File

@ -775,13 +775,16 @@ begin
if (crCompile in Project1.CompilerOptions.CompileReasons) then begin
// compile
// write state file to avoid building clean every time
if Project1.SaveStateFile(CompilerFilename,CompilerParams,false)<>mrOk then
Error(ErrorBuildFailed,'failed saving statefile of project '+AFilename);
if TheCompiler.Compile(Project1,
WorkingDir,CompilerFilename,CompilerParams,
BuildAll,false,false)<>mrOk
then
Error(ErrorBuildFailed,'failed compiling of project '+AFilename);
// compilation succeded -> write state file
if Project1.SaveStateFile(CompilerFilename,CompilerParams)<>mrOk then
if Project1.SaveStateFile(CompilerFilename,CompilerParams,true)<>mrOk then
Error(ErrorBuildFailed,'failed saving statefile of project '+AFilename);
end;