Identifying a compiler's version in a Jamfile

Is it possible to differentiate between compiler versions in a Jamfile? What I want to do is run our serialization tests (date_time) with gcc but only version 3 and up. Anyone know how to do this? Thanks, Bart Garst

Bart Garst wrote:
Is it possible to differentiate between compiler versions in a Jamfile?
What I want to do is run our serialization tests (date_time) with gcc but only version 3 and up.
Anyone know how to do this?
If the version number is part of the toolset name, for example gcc-3.2.3-tools.jam, than you can. Dave just posted about excluding build targets base on the toolset in: http://aspn.activestate.com/ASPN/Mail/Message/boost/2125392 [boost] Re: Regression Tests, Boost.Serialization :: ASPN Mail Archive :: boost Following that example you might write something like: rule disable-gcc-2.x ( toolset variant : requirements ) { if [ MATCH (gcc-2) : $(toolset) ] { requirements += <build>no ; } return $(requirements) ; } HTH. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

Rene Rivera <grafik.list@redshift-software.com> writes:
rule disable-gcc-2.x ( toolset variant : requirements ) { if [ MATCH (gcc-2) : $(toolset) ]
I'd make the dash optional if [ MATCH (gcc-?2) : $(toolset) ] we have no consistent naming convention (c.f. vc7.1).
{ requirements += <build>no ; } return $(requirements) ; }
HTH.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com

On Thu, 22 Jul 2004 16:27:40 -0500, Rene Rivera wrote:
Bart Garst wrote:
Is it possible to differentiate between compiler versions in a Jamfile?
What I want to do is run our serialization tests (date_time) with gcc but only version 3 and up.
Anyone know how to do this?
If the version number is part of the toolset name, for example gcc-3.2.3-tools.jam, than you can.
That's how I do it on my machine, but that won't transfer to the regression tests since they don't have my "custom" toolset. I'm hoping to find a solution that will work on all systems. Thx, Bart

Bart Garst wrote:
On Thu, 22 Jul 2004 16:27:40 -0500, Rene Rivera wrote:
If the version number is part of the toolset name, for example gcc-3.2.3-tools.jam, than you can.
That's how I do it on my machine, but that won't transfer to the regression tests since they don't have my "custom" toolset.
I'm hoping to find a solution that will work on all systems.
For BBv1 there is no general solution, it's not designed for that. For BBv2 it's possible, but that doesn't help you right now ;-) AFAIK all the testers use some variation of versioned toolsets, and if they don't they should. So what I posted, and what Dave modified will work in that context. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

Bart Garst writes:
On Thu, 22 Jul 2004 16:27:40 -0500, Rene Rivera wrote:
Bart Garst wrote:
Is it possible to differentiate between compiler versions in a Jamfile?
What I want to do is run our serialization tests (date_time) with gcc but only version 3 and up.
Anyone know how to do this?
If the version number is part of the toolset name, for example gcc-3.2.3-tools.jam, than you can.
That's how I do it on my machine, but that won't transfer to the regression tests since they don't have my "custom" toolset.
I'm hoping to find a solution that will work on all systems.
For the purpose of regression reports, a "numbered" toolset is *the* way to go. If it doesn't exist in the CVS yet, let's check it in. -- Aleksey Gurtovoy MetaCommunications Engineering
participants (4)
-
Aleksey Gurtovoy
-
Bart Garst
-
David Abrahams
-
Rene Rivera