fix, files unrelated to D are not anymore accepted

This commit is contained in:
Basile Burg 2015-05-10 03:22:13 +02:00
parent dde0d58921
commit 330190e9a9
1 changed files with 7 additions and 2 deletions

View File

@ -148,14 +148,19 @@ end;
procedure TCEProject.addSource(const aFilename: string); procedure TCEProject.addSource(const aFilename: string);
var var
relSrc, absSrc: string; relSrc, absSrc, ext: string;
begin begin
ext := ExtractFileExt(aFilename);
if (dExtList.IndexOf(ext) = -1) and
(ext <> '.obj') and (ext <> '.o')
and (ext <> '.lib') and (ext <> '.a') then
exit;
for relSrc in fSrcs do for relSrc in fSrcs do
begin begin
absSrc := expandFilenameEx(fBasePath,relsrc); absSrc := expandFilenameEx(fBasePath,relsrc);
if aFilename = absSrc then exit; if aFilename = absSrc then exit;
end; end;
fSrcs.Add(ExtractRelativepath(fBasePath,aFilename)); fSrcs.Add(ExtractRelativepath(fBasePath, aFilename));
end; end;
procedure TCEProject.setRoot(const aValue: string); procedure TCEProject.setRoot(const aValue: string);