Boost logo

Boost Testing :

From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2007-11-21 05:31:36


Rene Rivera <grafikrobot <at> gmail.com> writes:

>
> Joaquin M Lopez Munoz wrote:
> > Hi René, thanks for your answer, but I'm afraid that is not
> > exactly what I want: what I'd like is to change the executable
> > file name only, and leave the rest (.cpp names and target name)
> > untouched. Sort of like the following (if only the fictitious
> > <executable-name> existed):
> >
> > [run foo.cpp : <executable-name>bar : foo ]
>
> Hm, maybe Volodya has a better answer... There are two options I can
> think, which one is best depends on what you goal is in keeping the same
> target name:
[...]
> 2. Use the <tag> feature to change the exe file name. Something like:
[...]

I've tried (2) as follows:

    rule change-test_update-exe-name ( name : type ? : property-set )
    {
      ECHO "change-test_update-exe-name" ;
      if [ type.is-subtype $(type) EXE ]
      {
        return [ common.format-name
          test_updat : $(name) : $(type) : $(property-set) ] ;
      }
    }

    ...

    [ run test_update.cpp test_update_main.cpp
          : : :
          <tag>@change-test_update-exe-name ]

But that results in:

$ bjam --toolset=gcc test_update
[...]
d:/cygwin/home/joaquin/boost_1_35/tools/build/v2/build\virtual-target.jam:423:
 in _adjust-name from module object(file-target)@318
error: <tag>@rulename is present but is not the only <tag> feature
[...]

I've searched the web and seems like I should override the
parent project (boost?) <tag> rule, but I don't know how to do
that.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


Boost-testing list run by mbergal at meta-comm.com