Subject: Re: [Boost-build] error: unknown feature "<compileflags>" when using this feature in requirements with msvc
From: Jurko GospodnetiÄ (jurko.gospodnetic_at_[hidden])
Date: 2012-07-04 03:48:40
> Sorry if this is not the correct forum for this question.
It's the perfect one. :-)
> User manual (userman.pdf) that comes with the boost.build package
> mentions (pg 43) that compileflags feature can be used to specify
> "additional compiler flags that will be used when compiling both C and
> C++ sources.".
> But when I tried to use the following syntax in Jamroot file:
> <target-os>windows:<compileflags>/Fo:"Win32\\Debug" <address-model>32
> I got an error message:
> error: unknown feature "<compileflags>"
I just checked out the user manual at
http://www.boost.org/boost-build2/doc/userman.pdf and can not see where
it is 'listed under features'. The only place I see it listed is under
parameters for initializing toolsets.
I.e. there is no registered <compileflags> feature and you can not
use <compileflags> when specifying properties for a build request. But
when initializing a toolset using the toolset.using rule (or just
'using' inside project modules) you can pass it the '<compileflags>xxx'
option to specify a raw command-line option to pass to both C & C++
compilers when using that toolset.
It is unfortunate that the same syntax is used for both specifying
properties in a build request and requirements parameters for the
toolset.using rule. :-(
> I want to override the location of creation of .obj & .pdf file and also
> want to use some additional complier optimization flags for release.
Why not use the install rule for setting up where your built targets
should be copied to? Simply forcing the compiler to create your files in
a different location might confuse Boost Build, depending on what else
you told it to do since it expects to organize the built target
locations depending on the properties used when building it.
Hope this helps.
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