Boost logo

Boost-Build :

From: Daniel Einspanjer (deinspanjer_at_[hidden])
Date: 2006-02-21 18:16:38


I've created two custom generators that create CPP files from intermediate
files. I'm getting an ambiguity error that can be resolved by reordering my
imports, but I don't like that answer as it seems to indicate an underlying
problem with my approach.

Does anyone have any ideas what is going on?

Thanks,
Daniel

===================================

type.register CUSTOMERINFO : : CPP ;
generators.register [ new customerinfo-generator customerinfo.transform :
CUSTOMERINFO : CPP ] ;

type.register CSCONFIG : ini ;
generators.register [ new csconfig-generator csconfig.transform : CSCONFIG :
CPP ] ;
generators.register [ new csconfig-generator csconfig.merge : CSCONFIG :
CSCONFIG ] ;

In my Jamfile, I have the following (extract):

# if I reverse the order of these imports, everything works fine.
import customerinfo ;
import csconfig ;

customerinfo customerinfo.cpp
    : # sources
        # This cast is needed so the customerinfo generator
        # gets called instead of the standard CPP generator.
        [ cast _ customerinfo : defaultcustomerinfo.cpp ]
    ;

csconfig csconfig.ini
    : # sources
        csconfig-base.ini
        csconfig-acustomer.ini
    ;
cpp csconfig.cpp
    : # sources
        csconfig.ini
    : # requirements
        <built-tool>tools//makecppconfig
        <dependency>tools//makecppconfig
    ;

[C:\src\csmdev\engine\cpp\util\common]bjam csconfig.cpp
Error: ambiguity found when searching for best transformation
Trying to produce type 'CUSTOMERINFO' from:
 - { csconfig%csconfig.merge-csconfig.ini.CSCONFIG {
csconfig-base.ini.CSCONFIG } { csconfig-acustomer.ini.CSCONFIG } }
Generators that succeeded:
 - customerinfo.transform
 - csconfig.transform
First generator produced:
 - { customerinfo%customerinfo.transform-csconfig.cpp.CUSTOMERINFO {
csconfig%csconfig.transform-csconfig.cpp.CUSTOMERINFO {
csconfig%csconfig.merge-csco
nfig.ini.CSCONFIG { csconfig-base.ini.CSCONFIG } {
csconfig-acustomer.ini.CSCONFIG } } } }
Second generator produces:
 - { csconfig%csconfig.transform-csconfig.cpp.CUSTOMERINFO {
csconfig%csconfig.merge-csconfig.ini.CSCONFIG { csconfig-base.ini.CSCONFIG }
{ csconfig-acustomer.
ini.CSCONFIG } } }


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