|
Boost-Build : |
Subject: [Boost-build] Using target alternatives
From: Phil Bass (Phil.Bass_at_[hidden])
Date: 2008-09-12 05:35:54
I'm trying to use target alternatives to select one of two source files
based on the version of the gcc toolset, but I just get "No best
alternative" errors. The toolset versions are 1) the default version of
gcc for the host machine (Intel X86) and 2) a cross-compiler for a
PowerPC-based target.
My user-config.jam contains:
using gcc : x86 : g++ ; # X86 version
using gcc : ppc : gcc-ppc ; # PowerPC version
And my Jamfile contains:
obj Stub_Types_obj : Stub_Types_i386.cpp : <toolset>gcc-x86 ;
obj Stub_Types_obj : Stub_Types_ppc.cpp : <toolset>gcc-ppc ;
I've tried the following command lines:
bjam -n Stub_Types_obj
bjam -n Stub_Types_obj toolset=gcc
bjam -n Stub_Types_obj toolset=gcc-x86
bjam -n Stub_Types_obj toolset=gcc-ppc
They all produce:
error: No best alternative for ./Stub_Types_obj
next alternative: required properties: <toolset>gcc-x86
not matched
next alternative: required properties: <toolset>gcc-ppc
not matched
So I have two questions. First, is it possible to select by toolset
version? (I haven't been able to find anything in the docs on this.)
And, second, what should I be doing to create an object file from one of
two source files depending on the selected toolset/version?
-- Phil Bass (pab_at_[hidden]) The views expressed in this e-mail/posting are those of the author and do not necessarily reflect those of Isotek Electronics Ltd.
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