* When bmBuildUnit is the only available build mode, use it

git-svn-id: trunk@22178 -
This commit is contained in:
joost 2012-08-22 18:58:07 +00:00
parent 1f2578077c
commit 66d83bc3d2

View File

@ -1262,6 +1262,7 @@ ResourceString
SInfoSourceNewerDest = 'Source file "%s" (%s) is newer than destination "%s" (%s).';
SInfoDestDoesNotExist = 'Destination file "%s" does not exist.';
SInfoFallbackBuildmode = 'Buildmode not supported by package, falling back to one by one unit compilation';
SInfoFallbackBuildmodeBU= 'Buildmode not supported by package, falling back to compilation using a buildunit';
SDbgComparingFileTimes = 'Comparing file "%s" time "%s" to "%s" time "%s".';
SDbgCompilingDependenciesOfTarget = 'Compiling dependencies of target %s';
@ -5427,8 +5428,13 @@ begin
case Defaults.BuildMode of
bmOneByOne: begin
if bmOneByOne in APackage.SupportBuildModes then
APackage.FBuildMode:=bmOneByOne
if (bmOneByOne in APackage.SupportBuildModes) then
APackage.FBuildMode:=bmBuildUnit
else if bmBuildUnit in APackage.SupportBuildModes then
begin
log(vlInfo,SInfoFallbackBuildmodeBU);
APackage.FBuildMode:=bmBuildUnit;
end
else
raise exception.create(SErrUnsupportedBuildmode);
end;