mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-21 17:35:55 +01:00
Demonstrate C# platform option.
Signed-off-by: Thomas Nagy <tnagy2pow10@gmail.com>
This commit is contained in:
parent
264b0ab5f5
commit
30097510a8
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user