codetools: GetFPCVersion: check if update needed

git-svn-id: trunk@45208 -
This commit is contained in:
mattias 2014-05-28 05:57:06 +00:00
parent 922feb68b1
commit 837e4699e5

View File

@ -8511,9 +8511,12 @@ begin
Result:={$I %FPCVersion%}
else
Result:='';
if not IsFPCExecutable(CompilerFilename,ErrorMsg) then exit;
if not IsFPCExecutable(CompilerFilename,ErrorMsg) then
exit;
CfgCache:=ConfigCaches.Find(CompilerFilename,ExtraOptions,TargetOS,TargetCPU,true);
if not CfgCache.Update(TestFilename,ExtraOptions) then exit;
if CfgCache.NeedsUpdate
and not CfgCache.Update(TestFilename,ExtraOptions) then
exit;
if CfgCache.FullVersion='' then exit;
Result:=CfgCache.FullVersion;
end;