Hallo,
In order to build Boost.Serialization with some compilers
the path to an
external installation of Spirit must be specified on the
command line before
$(BOOST_ROOT). One way to achieve that is to ensure that
<cxxflags>-I/path/to/spirit is defined.
To ensure that Serialization builds with all the supported
toolsets I'd like to
define <cxxflags> as above only for the toolset that
require it and only if
$(SPIRIT_ROOT) is defined.
I had thought of writing a rule that took the toolset as
argument and checked
whether <cxxflags> was needed, roughly as follows
(pseudo bjam code):
rule include-spirit ( toolset )
{
local SPIRIT_ROOT = [ modules.peek : SPIRIT_ROOT ] ;
if ( $(SPIRIT_ROOT) && $(toolset) in borland vc cw
)
{
return
<toolset>$(toolset):<cxxflags>-I$(SPIRIT_ROOT) ;
}
}
To be used as (pseudo bjam code again):
lib boost_serialization
: $(SOURCES).cpp
:
<link>shared:<define>BOOST_SERIALIZATION_DYN_LIN
K=1
include-spirit
:
:
<link>shared:<define>BOOST_SERIALIZATION_DYN_LIN
K=1
;
However I don't know the correct way to do it and I couldn't
find an example to
copy from....
Thank you,
Nicola Musatti
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|