Jelajahi Sumber

improve Prefer32bit configuration option

UbitUmarov 6 tahun lalu
induk
melakukan
3fe3471532

+ 18 - 0
Prebuild/src/Core/Nodes/OptionsNode.cs

@@ -277,6 +277,24 @@ namespace Prebuild.Core.Nodes
 				m_SuppressWarnings = value;
 			}
 		}
+
+		[OptionNode("Prefer32Bit")]
+		private bool m_Prefer32Bit;
+
+		/// <summary>
+		/// 
+		/// </summary>
+		public bool Prefer32Bit
+		{
+			get
+			{
+				return m_Prefer32Bit;
+			}
+			set
+			{
+				m_Prefer32Bit = value;
+			}
+		}
         
 		[OptionNode("OutputPath")]
 		private string m_OutputPath = "bin/";

+ 1 - 1
Prebuild/src/Core/Targets/VSGenericTarget.cs

@@ -254,7 +254,7 @@ namespace Prebuild.Core.Targets
 					ps.WriteLine("	  <NoStdLib>{0}</NoStdLib>", conf.Options["NoStdLib"]);
 					ps.WriteLine("	  <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]);
 					ps.WriteLine("	  <PlatformTarget>{0}</PlatformTarget>", conf.Platform);
-                    ps.WriteLine("    <Prefer32Bit>false</Prefer32Bit>");
+                    ps.WriteLine("	  <Prefer32Bit>{0}</Prefer32Bit>",conf.Options["Prefer32Bit"]);
 					ps.WriteLine("	</PropertyGroup>");
 				}
 

+ 3 - 2
Prebuild/src/data/prebuild-1.10.xsd

@@ -186,8 +186,9 @@
 		<xs:complexType>
 			<xs:all>
 				<xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
-				<xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
-				<xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
+                <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
+                <xs:element name="Prefer32Bit" type="xs:boolean" minOccurs="0" />               
+                <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
 				<xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
 				<xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" />
 				<xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" />

TEMPAT SAMPAH
bin/Prebuild.exe


+ 2 - 0
prebuild.xml

@@ -14,6 +14,7 @@
         <DebugInformation>true</DebugInformation>
         <IncrementalBuild>true</IncrementalBuild>
         <NoStdLib>false</NoStdLib>
+		<Prefer32Bit>false</Prefer32Bit>
       </Options>
     </Configuration>
     <Configuration name="Release">
@@ -29,6 +30,7 @@
         <DebugInformation>false</DebugInformation>
         <IncrementalBuild>true</IncrementalBuild>
         <NoStdLib>false</NoStdLib>
+		<Prefer32Bit>false</Prefer32Bit>
       </Options>
     </Configuration>