浏览代码

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

git-svn-id: trunk@22178 -
joost 13 年之前
父节点
当前提交
66d83bc3d2
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      packages/fpmkunit/src/fpmkunit.pp

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

@@ -1262,6 +1262,7 @@ ResourceString
   SInfoSourceNewerDest    = 'Source file "%s" (%s) is newer than destination "%s" (%s).';
   SInfoSourceNewerDest    = 'Source file "%s" (%s) is newer than destination "%s" (%s).';
   SInfoDestDoesNotExist   = 'Destination file "%s" does not exist.';
   SInfoDestDoesNotExist   = 'Destination file "%s" does not exist.';
   SInfoFallbackBuildmode  = 'Buildmode not supported by package, falling back to one by one unit compilation';
   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".';
   SDbgComparingFileTimes    = 'Comparing file "%s" time "%s" to "%s" time "%s".';
   SDbgCompilingDependenciesOfTarget = 'Compiling dependencies of target %s';
   SDbgCompilingDependenciesOfTarget = 'Compiling dependencies of target %s';
@@ -5427,8 +5428,13 @@ begin
 
 
   case Defaults.BuildMode of
   case Defaults.BuildMode of
     bmOneByOne:  begin
     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
                    else
                      raise exception.create(SErrUnsupportedBuildmode);
                      raise exception.create(SErrUnsupportedBuildmode);
                  end;
                  end;