Boost logo

Boost-Build :

From: Pedro Ferreira (pedro.ferreira_at_[hidden])
Date: 2003-07-22 08:25:21


Hi again,

> Since you've said in a later email that discovered a problem with the
patch,
> I'll wait a bit before applying this one and testing it.

I've attached a new version: I am now restoring the original name after
constructing the targets. Hope this is ok.

> One question though. If I have
>
> exe a : a.cpp :
> <variant>debug:<tag>_d
> <variant>release:<tag>_r
> <link>shared:<tag>_d
> ;
>
> what names will be created when I run "bjam debug link=static" and "bjam
> profile"? Won't it be the same name?

Yes, they will. But if you define something like:

...
<variant>debug:<tag>_d
<variant>release:<tag>_r
<variant>profile:<tag>_p
<link>shared:<tag>s
...

you'll get different names for each (debug release profile) * (static
shared) combination: a_d, a_ds, a_r, a_rs, a_p, a_ps.

> > BTW, I'm not sure what's the best way to handle dll and exe suffixes
across
> > different platforms in the tests. Any suggestion or pointer to an
example?
>
> Even better, I have a pointer to docs. Open "test/test_system.html", click
on
> "Methods for declaring expectation" item to table of content and read the
> second paragraph. The main idea is that you specify Windows suffixes and
test
> system adjusts them as needed.

Thanks. I always try to avoid getting RTMs but I deserved this one ;-)

Please let me know if this implementation is correct or if I should change
anything.

Regards,

Pedro

 ------=_NextPart_000_0267_01C3505D.15655950 Content-Type: application/octet-stream;
name="targets.jam.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="targets.jam.diff"

[Attachment content not displayed.] ------=_NextPart_000_0267_01C3505D.15655950 Content-Type: application/octet-stream;
name="builtin.jam.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="builtin.jam.diff"

[Attachment content not displayed.] ------=_NextPart_000_0267_01C3505D.15655950 Content-Type: text/plain;
name="tag.py"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="tag.py"

#!/usr/bin/python

# Copyright (C) Vladimir Prus 2003. Permission to copy, use, modify, sell =
and
# distribute this software is granted provided this copyright notice appea=
rs in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purpose.

from BoostBuild import Tester, List

t =3D Tester()

t.write("project-root.jam", "")
t.write("Jamfile", """=20
local tags =3D <variant>debug:<tag>_d <variant>release:<tag>_r <variant>pro=
file:<tag>_p <link>shared:<tag>s <link>static:<tag>t ;
exe a : a.cpp : $(tags) ;
lib b : a.cpp : $(tags) ;
stage c : a ;
""")

t.write("a.cpp", """=20
int main()
{
return 0;
}

#ifdef _MSC_VER
__declspec (dllexport) void x () {}=20
#endif
""")

file_list =3D \
List("bin/$toolset/debug/main-target-a/a_ds.exe") + \
List("bin/$toolset/debug/main-target-b/b_ds.dll") + \
List("c/a_ds.exe") + \
List("bin/$toolset/release/main-target-a/a_rs.exe") + \
List("bin/$toolset/release/main-target-b/b_rs.dll") + \
List("c/a_rs.exe") + \
List("bin/$toolset/profile/main-target-a/a_ps.exe") + \
List("bin/$toolset/profile/main-target-b/b_ps.dll") + \
List("c/a_ps.exe") + \
List("bin/$toolset/debug/link-static/main-target-a/a_dt.exe") + \
List("bin/$toolset/debug/link-static/main-target-b/b_dt.lib") + \
List("c/a_dt.exe") + \
List("bin/$toolset/release/link-static/main-target-a/a_rt.exe") + \
List("bin/$toolset/release/link-static/main-target-b/b_rt.lib") + \
List("c/a_rt.exe") + \
List("bin/$toolset/profile/link-static/main-target-a/a_pt.exe") + \
List("bin/$toolset/profile/link-static/main-target-b/b_pt.lib") + \
List("c/a_pt.exe") \

variants =3D "debug release profile link=3Dstatic,shared"

t.run_build_system(variants)
t.expect_addition(file_list)

t.run_build_system(variants + " clean")
t.expect_removal(file_list)

t.cleanup()

 ------=_NextPart_000_0267_01C3505D.15655950--


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