blob: a90d9c2ce268501bf7685ce3c65673e6c0db4309 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
Reference: https://github.com/nant/nant/issues/91
Obtained from: https://github.com/nant/nant/commit/69c8ee96493c5d953212397c8ca06c2392372ca4
https://github.com/nant/nant/commit/4ad065d009b043996d4ce2d25ce5031d81c6ce60
--- src/NAnt.DotNet/Tasks/CscTask.cs.orig 2012-06-09 14:05:53 UTC
+++ src/NAnt.DotNet/Tasks/CscTask.cs
@@ -90,6 +90,7 @@ namespace NAnt.DotNet.Tasks {
private string _langVersion;
// framework configuration settings
+ private double _mcsSdk = 0;
private bool _supportsDocGeneration = true;
private bool _supportsPlatform;
private bool _supportsLangVersion;
@@ -362,6 +363,21 @@ namespace NAnt.DotNet.Tasks {
#endregion Public Instance Properties
+ #region Protected Instance Properties
+
+ /// <summary>
+ /// Gets or sets the mcs sdk version to apply to the new mcs compiler
+ /// for Mono 3.0+
+ /// </summary>
+ [FrameworkConfigurable("mcssdk")]
+ protected double McsSdk
+ {
+ get { return _mcsSdk; }
+ set { _mcsSdk = value; }
+ }
+
+ #endregion Protected Instance Properties
+
#region Override implementation of CompilerBase
/// <summary>
@@ -378,6 +394,16 @@ namespace NAnt.DotNet.Tasks {
WriteOption(writer, "baseaddress", BaseAddress);
}
+ // If mcs is the compiler and the specified McsSdk version is specified, append the new
+ // -sdk: option to the argument list.
+ if (PlatformHelper.IsMono)
+ {
+ if (ExeName.Equals("mcs", StringComparison.InvariantCultureIgnoreCase) && _mcsSdk > 0)
+ {
+ WriteOption(writer, "sdk", _mcsSdk.ToString());
+ }
+ }
+
// XML documentation
if (DocFile != null) {
if (SupportsDocGeneration) {
|