Browse Source

Added 'override' and 'overerr' options.

woollybah 6 năm trước cách đây
mục cha
commit
2e11c4e09f
3 tập tin đã thay đổi với 29 bổ sung1 xóa
  1. 4 0
      CHANGELOG
  2. 13 1
      bmk_config.bmx
  3. 12 0
      bmk_make.bmx

+ 4 - 0
CHANGELOG

@@ -1,3 +1,7 @@
+## [3.32] - 2019-02-11
+### Added
+ - New 'override' and 'overerr' options for bcc Override support.
+ 
 ## [3.31] - 2019-01-18
 ## [3.31] - 2019-01-18
 ### Added
 ### Added
  - New 'single' option. Forces single-threaded build mode.
  - New 'single' option. Forces single-threaded build mode.

+ 13 - 1
bmk_config.bmx

@@ -10,7 +10,7 @@ Import brl.map
 
 
 Import "stringbuffer_core.bmx"
 Import "stringbuffer_core.bmx"
 
 
-Const BMK_VERSION:String = "3.31"
+Const BMK_VERSION:String = "3.32"
 
 
 Const ALL_SRC_EXTS$="bmx;i;c;m;h;cpp;cxx;mm;hpp;hxx;s;cc;asm;S"
 Const ALL_SRC_EXTS$="bmx;i;c;m;h;cpp;cxx;mm;hpp;hxx;s;cc;asm;S"
 
 
@@ -59,6 +59,8 @@ Global opt_manifest:Int = True
 Global opt_single:Int
 Global opt_single:Int
 Global opt_nodef:Int
 Global opt_nodef:Int
 Global opt_nohead:Int
 Global opt_nohead:Int
+Global opt_require_override:Int
+Global opt_override_error:Int
 
 
 Global opt_dumpbuild
 Global opt_dumpbuild
 
 
@@ -249,6 +251,10 @@ Function ParseConfigArgs$[]( args$[], legacyMax:Int = False )
 			opt_nodef = True
 			opt_nodef = True
 		Case "nohead"
 		Case "nohead"
 			opt_nohead = True
 			opt_nohead = True
+		Case "override"
+			opt_require_override = True
+		Case "overerr"
+			opt_override_error = True
 		Default
 		Default
 			CmdError "Invalid option '" + arg[1..] + "'"
 			CmdError "Invalid option '" + arg[1..] + "'"
 		End Select
 		End Select
@@ -394,6 +400,12 @@ Function Usage:String(fullUsage:Int = False)
 		s:+ "~t~tSpecify output file. (makeapp only)~n"
 		s:+ "~t~tSpecify output file. (makeapp only)~n"
 		s:+ "~t~tBy default, the output file is placed into the same directory as the root source file."
 		s:+ "~t~tBy default, the output file is placed into the same directory as the root source file."
 		s:+ "~n~n"
 		s:+ "~n~n"
+		s:+ "~t-override~n"
+		s:+ "~t~tWarn if overriding methods are not declared with Override property (NG only)~n"
+		s:+ "~n~n"
+		s:+ "~t-overerr~n"
+		s:+ "~t~tUpgrades -override warnings to errors. (NG only)~n"
+		s:+ "~n~n"
 		s:+ "~t-q~n"
 		s:+ "~t-q~n"
 		s:+ "~t~tQuiet build."
 		s:+ "~t~tQuiet build."
 		s:+ "~n~n"
 		s:+ "~n~n"

+ 12 - 0
bmk_make.bmx

@@ -386,6 +386,12 @@ Type TBuildManager Extends TCallback
 					sb.append(" -nohead")
 					sb.append(" -nohead")
 				End If
 				End If
 			End If
 			End If
+			If opt_require_override Then
+				sb.Append(" -override")
+				If opt_override_error Then
+					sb.Append(" -overerr")
+				End If
+			End If
 		End If
 		End If
 
 
 		source.cc_opts :+ cc_opts
 		source.cc_opts :+ cc_opts
@@ -1225,6 +1231,12 @@ Type TBuildManager Extends TCallback
 				If opt_musl Then
 				If opt_musl Then
 					sb.Append(" -musl")
 					sb.Append(" -musl")
 				End If
 				End If
+				If opt_require_override Then
+					sb.Append(" -override")
+					If opt_override_error Then
+						sb.Append(" -overerr")
+					End If
+				End If
 			End If
 			End If
 	
 	
 			source.bcc_opts = sb.ToString()
 			source.bcc_opts = sb.ToString()