|
Boost-Build : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-07-01 17:09:06
As mentioned in my earlier post, I am working on developing toolsets for the
.NET environment. Here is the one for C#.NET:
----- [csnet.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)
import toolset : flags ;
import feature ;
import type ;
import generators ;
feature.extend toolset : csnet ;
type.register CS : cs ;
# Allow the location of the .NET framework to be specified as a path
# [todo]: Autodetect .NET framework installations
# [todo]: .NET version control (1.0 1.1)
rule init ( path ? )
{
if $(path)
{
.CSC = $(path)/csc ;
}
}
.CSC = csc ;
# Configure the various property settings.
flags csnet.build CSFLAGS <user-interface>console : /t:exe ;
flags csnet.build CSFLAGS <user-interface>gui : /t:winexe ;
flags csnet.build CSFLAGS <variant>debug : /debug+ ;
flags csnet.build CSFLAGS <variant>release : /debug- ;
flags csnet.build CSFLAGS <optimization>off : /optimize- ;
flags csnet.build CSFLAGS <optimization>speed : /optimize+ ;
flags csnet.build CSFLAGS <optimization>space : /optimize+ ;
flags csnet.build DEFINES <define> ;
flags csnet.build LIBPATH <library-path> ;
# Perform the compilation/linking stage.
# [todo]: provide additional support for assemblies
actions build
{
$(.CSC) /nologo $(CSFLAGS) /lib:"$(LIBPATH)" /out:"$(<)" "$(>)"
}
# Use composing here because C#.NET does not have a linking stage.
# [todo]: add CS --> DLL support
generators.register-composing csnet.build : CS : EXE ;
----- [end-of-file] -----
To use it, you need to direct the toolset to the .NET framework directory,
e.g.:
using csnet : "C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322" ;
It does not yet provide an autodetect feature, or version control. It also
does not put the files into a dotnet subdirectory or just bin/<variant>,
rather, it places them in the C++ toolset currently being used.
To build, just use BBv2 as normal:
exe hellonet : hellonet.cs ;
NOTE: lib is not currently supported.
Regards,
Reece
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
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