Boost logo

Boost-Build :

From: Edward Diener (eldiener_at_[hidden])
Date: 2019-10-03 22:28:03

On 10/1/2019 2:12 PM, Phillip Seaver via Boost-build wrote:
> On 10/1/2019 1:49 PM, Edward Diener via Boost-build wrote:
>> I just want to use the 'compile' rule to compile a CUDA file, meaning
>> a file ending in .cu, to an object file in a .jam file. In all other
>> respects the CUDA file should be treated like a normal .cpp file being
>> compiled with the 'compile' rule. Is there some way to specify this in
>> a jam file ?
>> My current attempt generates:
>> somepath/boost/tools/build/src/build/generators.jam:1127: in
>> ensure-type from module generators
>> error: target { } has no type
>> etc.
>> What do I have to do to tell Boost Build that the .cu type should be
>> treated just like .cpp type for my 'compile' test ?
> If it's just for a file or two, you can probably do "[ cast _ cpp :
> ]" where you would normally put the cpp file.  To treat
> all .cu files as cpp files, I think "type.register-suffixes cu : cpp ;"
> will do it.  (I haven't tested either -- just looking at the boost-build
> source).

Your first suggestion worked fine. Just had to also add 'import cast ;'.
Thanks !

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at