2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-12-23 09:45:13 +01:00

Demonstrate C# platform option.

Signed-off-by: Thomas Nagy <tnagy2pow10@gmail.com>
This commit is contained in:
andreww 2012-04-17 09:36:22 +01:00 committed by Thomas Nagy
parent 264b0ab5f5
commit 30097510a8
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,5 @@
using System;
public class Dye {
private string msg = "";
@ -5,7 +7,18 @@ public class Dye {
msg = _msg;
}
private static string PointerSizeDescription {
get {
if (IntPtr.Size==8) {
return "64-bit";
} else if (IntPtr.Size==4) {
return "32-bit";
}
return "Unknown";
}
}
public void display() {
System.Console.WriteLine(msg);
System.Console.WriteLine("{0} ({1})", msg, PointerSizeDescription);
}
}

View File

@ -31,6 +31,7 @@ def build(bld):
bld(features='cs', source='My.cs Dye.cs', gen='my.dll', name='mylib', csdebug='full')
bld(features='cs', source='Hi.cs', includes='.', gen='hi.exe', use='mylib', name='hi')
bld(features='cs', source='Hi.cs', includes='.', gen='hi-x86.exe', use='mylib', name='hi', platform='x86')
if bld.env.HAS_GTKSHARP:
bld(features='cs', source='Simple.cs', includes='.', gen='mono-hello.exe', csflags=['-pkg:gtk-sharp-2.0'])