From 2039c212960f18123ce8ade6069e0ace5b600698 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 11 Apr 2012 09:00:32 +0000 Subject: [PATCH] lazbuild: fixed repeated build project clean: save project state file before compiling too git-svn-id: trunk@36724 - --- ide/lazbuild.lpr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ide/lazbuild.lpr b/ide/lazbuild.lpr index 0893f1262c..e335e4293e 100644 --- a/ide/lazbuild.lpr +++ b/ide/lazbuild.lpr @@ -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;