Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2011-02-13 00:30:18 +0300
committerMiguel de Icaza <miguel@gnome.org>2011-02-13 00:30:28 +0300
commit7bcc94629da492cc51c94fd319296768ce0ec7ee (patch)
treef3c5fbd5ac53391835baa50419337a3d11a3aa8d /msvc/scripts/genproj.cs
parent31dd8c91bebedbd8b9b202e4d37cca572f336107 (diff)
Pass warnings
Diffstat (limited to 'msvc/scripts/genproj.cs')
-rw-r--r--msvc/scripts/genproj.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/msvc/scripts/genproj.cs b/msvc/scripts/genproj.cs
index c73fa3d75d6..a7da552334a 100644
--- a/msvc/scripts/genproj.cs
+++ b/msvc/scripts/genproj.cs
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Text;
using System.Globalization;
using System.Xml.Linq;
+using System.Linq;
public enum Target {
Library, Exe, Module, WinExe
@@ -525,13 +526,23 @@ class MsbuildGenerator {
static string Load (string f)
{
- if (File.Exists (f)){
- using (var sr = new StreamReader (f)){
+ var native = NativeName (f);
+
+ if (File.Exists (native)){
+ using (var sr = new StreamReader (native)){
return sr.ReadToEnd ();
}
} else
return "";
}
+
+ public static string NativeName (string path)
+ {
+ if (System.IO.Path.DirectorySeparatorChar == '/')
+ return path.Replace ("\\", "/");
+ else
+ return path.Replace ("/", "\\");
+ }
public string Generate (XElement xproject)
{
@@ -589,7 +600,7 @@ class MsbuildGenerator {
string [] source_files;
Console.WriteLine ("Base: {0} res: {1}", base_dir, response);
- using (var reader = new StreamReader (base_dir + "\\" + response)){
+ using (var reader = new StreamReader (NativeName (base_dir + "\\" + response))){
source_files = reader.ReadToEnd ().Split ();
}
StringBuilder sources = new StringBuilder ();
@@ -662,6 +673,7 @@ class MsbuildGenerator {
//
string output = template.
Replace ("@DEFINES@", defines.ToString ()).
+ Replace ("@DISABLEDWARNINGS@", string.Join (",", (from i in ignore_warning select i.ToString ()).ToArray ())).
Replace ("@NOSTDLIB@", StdLib ? "" : "<NoStdLib>true</NoStdLib>").
Replace ("@ALLOWUNSAFE@", Unsafe ? "<AllowUnsafeBlocks>true</AllowUnsafeBlocks>" : "").
Replace ("@ASSEMBLYNAME@", Path.GetFileNameWithoutExtension (output_name)).