Boost logo

Boost-Build :

Subject: Re: [Boost-build] Boost-build Digest, Vol 55, Issue 9
From: Laszlo Marak (ujoimro_at_[hidden])
Date: 2010-03-16 05:35:46


Hello Vladimir,

so I have resolved the issue (partially at least) with the reference to the
extended manual. I must say this manual is particularly difficult to find
unless you know exactly what are you looking for. So my solution is the
following:

I register a new extension

import type ;
type.register NVIDIA_SOURCE : cu ;
type.register NVIDIA_OBJ : cuo ;

This will invoce the compiler action. In this place I have to call the object
files cuo, however the Nvidia compiler doesn't like the cuo extention, so I
have to make a symbolic link to that file. The actions are as follow

actions nvcc_compile
{
    $(NVCC) $(NVCC_COMPILE_FLAGS) -o `pwd`/$(1) `pwd`/$(2)
}

actions nvcc_link
{
    ln -f -s `pwd`/$(2) `pwd`/$(2:D)/$(2:B).o
    $(NVCC) $(NVCC_LINK_FLAGS) -o `pwd`/$(1) `pwd`/$(2:D)/$(2:B).o
}

in the jamroot file I
import nvidia ;

and to the linkin phase I add the cuda library (which is normally invoked by
nvcc, but the important thing is that the updates are working correctly)

Thank You for Your help,

Laszlo

On 2010. March 12. Friday 18:00:05 boost-build-request_at_[hidden] wrote:
> Message: 3
> Date: Fri, 12 Mar 2010 14:44:16 +0300
> From: Vladimir Prus <vladimir_at_[hidden]>
> To: boost-build_at_[hidden]
> Subject: Re: [Boost-build] Boost-build Digest, Vol 55, Issue 7
> Message-ID: <hnd9eg$n8l$1_at_[hidden]>
> Content-Type: text/plain; charset="ISO-8859-1"
>
> Laszlo Marak wrote:
> > Dear Volodya,
> >
> > thank you for your answer. The problem is, that in your solution you pre-
> > suppose, that the new compiler has the same parametrization and usage in
> > general as gcc.
>
> Laszlo,
>
> there's no such assumption, I don't think. Because you define a new
> generator, it's complete up to you how it works, and nothing is derived
> from gcc.
>
> > It's only the library that is compatible with gcc. Forgive me
> > being a little insistive, but isn't there simply a way to make the
> > actions in my-rule being called before bjam starts to compile the
> > executable file?
>
> Of course there is -- the 'make' metatarget is quite suitable -- but less
> convenient to reuse.
>
> > Also,
> > where is this extenders manual?
>
> It's part of the official docs, see here:
> http://www.boost.org/boost-build2/doc/html/bbv2/extender.html
>
> - Volodya
>


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