2
0
Эх сурвалжийг харах

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

git-svn-id: trunk@22178 -
joost 13 жил өмнө
parent
commit
66d83bc3d2

+ 8 - 2
packages/fpmkunit/src/fpmkunit.pp

@@ -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;