|
Boost-Build : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-07-06 04:38:59
Vladimir Prus wrote:
>Reece Dunn wrote:
> > As mentioned in my earlier post, I am working on developing toolsets for
> > the .NET environment. Here is the one for C#.NET:
>
>That's interesting! The more toolsets, the better!
Cool. I have made several updates on it since the post: it now uses the
dotnet toolset and configures C#, JavaScript.NET and VB.NET; and I have got
versioning working :).
>Looks like you have a wrapped line again ;-) If you could send this toolset
>as
>attachment, I'd be happy to add it to CVS.
I have fixed the non-action lines, but you may need to correct the action
lines.
>Though maybe you can change the
>'init' rule to accept 'command' not 'path'? Fancy stuff like autodetection
>is
>not strictly necessary, but it would be nice to have all toolsets
>consistent.
Done. The default-paths rule is a placeholder at the moment. You can now add
something like:
using dotnet : 1.1 :
"C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/csc.exe" ;
using dotnet : 2.0 :
"C:/WINDOWS/Microsoft.NET/Framework/v2.0.40607/csc.exe" ;
to the user-config.jam.
BTW: Adding .NET/CLR support for the msvc toolset should be fairly
straightforward:
feature.subfeature toolset msvc : managed : off on : optional ;
...
flags msvc.compile CFLAGS <managed>on : /clr ;
Although this might be complicated if you want .NET1.x or C++/CLI syntax
selection in VC8. I haven't tested the above because I don't have that much
.NET experience, but it should work with the other options.
Regards,
Reece
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
------=_NextPart_000_3666_5d99_1e64 Content-Type: text/plain; name="dotnet.jam"; format=flowed
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="dotnet.jam"
# Copyright (C) Reece H Dunn 2004
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Adds support for the .NET framework
# TODO: dynamic library support
import toolset : flags ;
import feature ;
import type ;
import generators ;
import common ;
feature.extend toolset : dotnet ;
rule init ( version ? : command * cscompiler ? jscompiler ? vbcompiler ? )
{
cscompiler ?= csc ;
jscompiler ?= jsc ;
vbcompiler ?= vbc ;
local condition = [ common.check-init-parameters dotnet
: version $(version) ] ;
command = [ common.get-invocation-command dotnet : csc.exe : $(command)
: [ default-paths $(version) ] ] ;
if $(command)
{
command = [ common.get-absolute-tool-path $(command[-1]) ] ;
}
local root = $(command) ;
flags dotnet.build.csc .CSC $(condition) : $(root)//$(cscompiler) ;
flags dotnet.build.jsc .JSC $(condition) : $(root)//$(jscompiler) ;
flags dotnet.build.vbc .VBC $(condition) : $(root)//$(vbcompiler) ;
}
rule default-paths ( version ? )
{
return "" ; # FIXME
}
type.register CS : cs ;
type.register JS : js ;
type.register VB : vb ;
generators.register-composing dotnet.build.csc : CS : EXE : <toolset>dotnet
;
generators.register-composing dotnet.build.jsc : JS : EXE : <toolset>dotnet
;
generators.register-composing dotnet.build.vbc : VB : EXE : <toolset>dotnet
;
flags dotnet.build DNETFLAGS <user-interface>console : /t:exe ;
flags dotnet.build DNETFLAGS <user-interface>gui : /t:winexe ;
flags dotnet.build DNETFLAGS <variant>debug : /debug+ ;
flags dotnet.build DNETFLAGS <variant>release : /debug- ;
flags dotnet.build DNET2FLAGS <optimization>off : /optimize- ;
flags dotnet.build DNET2FLAGS <optimization>speed : /optimize+ ;
flags dotnet.build DNET2FLAGS <optimization>space : /optimize+ ;
flags dotnet.build DEFINES <define> ;
flags dotnet.build LIBPATH <library-path> ;
##### C#.NET
actions build.csc
{
$(.CSC) /nologo $(DNETFLAGS) $(DNET2FLAGS) /d:"$(DEFINES)"
/lib:"$(LIBPATH)" /out:"$(<)" "$(>)"
}
##### JS.NET
actions build.jsc
{
$(.JSC) /nologo $(DNETFLAGS) /lib:"$(LIBPATH)" /out:"$(<)" "$(>)"
}
##### VB.NET
actions build.vbc
{
$(.VBC) /nologo $(DNETFLAGS) $(DNET2FLAGS) /lib:"$(LIBPATH)" /out:"$(<)"
"$(>)"
}
------=_NextPart_000_3666_5d99_1e64--
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk