Boost logo

Boost-Build :

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 06:46:00


> I am actually trying to change the directory structure so that
> intermediate (such as .obj, .pdb) and final build file (such as .lib,
> .exe) to get built in directory structure same as that generated by
> visual studio, like:
> <VSProjectTopDir>\Win32\Debug
> Because, the directory hierarchy created by boost is too deep. This
> means, the debugging thru VS becomes difficult if we are building using
> the Jamroot.

   I am not really sure what you mean by 'debugging through VS becomes
difficult'? Tracing through the source code should work fine. We use
Boost Build based builds run from Visual Studio all the time so I'm
positive things can be set up to work smoothly on your end as well.

   If you want to copy the resulting exes to a some specific folder as a
part of the build - just use the 'install' rule. But know that if you
simply copy files into a fixed location it is up to you to organize
where that location is so you do not run into errors when building
multiple project variants at once.

> Also I found that the .pdb files are created in the top level directory
> and not in the <variant> specific path. This means these .pdbs may get
> overwritten by other variant.

   Nope. Just tried a simple one-exe project (jamroot.jam consists of
just 'exe x : x.cpp ;') and this is the resulting file & folder
structure I got:

> C:\Users\Jurko\ddd>tree /f
> Folder PATH listing
> Volume serial number is F076-A2E9
> C:.
> │ jamroot.jam
> │ x.cpp
> │
> └───bin
> │ config.log
> │
> └───msvc-9.0
> └───debug
> └───threading-multi
> x.exe
> x.exe.manifest
> x.exe.rsp
> x.obj
> x.obj.rsp
> x.pdb

   If you are running into the 'long folder path' limit because you have
many custom features defined or because your project's is located in a
folder with a long path in the first place you can try using the
'--abbreviate-paths' command-line option. This will cause Boost Build to
use shorter folder names for each feature.

   If that still is not enough (and this is true in several of our
larger project setups) - you can use the '--hash' command-line option
which will flatten the target folder hierarchy to depth 1 with build
results for each property-set ending up in a folder named after the MD5
hash value of that property-set.

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at