Boost logo

Boost Users :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-06-18 10:56:01


Seb Martel wrote:
> Seb Martel wrote:
>
>>Hi,
>>
>>I am trying to build boost.threads 1.32 statically with struct alignment
>>set to 1.
>>
>>I dug up from the documentation that this should do the trick:
>>
>>bjam -sTOOLS=vc-7_1 "-sBUILD=debug <struct-alignment>1" -a -d+2
>>
>>however, I don't see the alignment switch '/Zp1' on the command line :
>>
>>
>> "cl" /Zm800 -nologo /EHsc -c -DBOOST_THREAD_LIB_NAME=boost_thread
>>-DBOOST_THREAD_BUILD_LIB=1 /Z7 /Od /Ob0 /EHsc /GR /MDd /Op Zc:forScope
>>/Zc:wchar_t -I"..\..\..\bin\boost\libs\thread\build" -I"C:\Program
>>Files\Microsoft Visual Studio .NET 2003\VC7\include" I"G:\boost_1_32_0"
>>
>>-Fo"..\..\..\bin\boost\libs\thread\build\libboost_thread.lib\vc-7_1\debug\threading-multi\tss.obj"
>>-Tp"..\..\..\libs\thread\build\..\src\tss.cpp"
>>
>>Is there something I am missing ?
>>
>>-seb
>
>
> I am getting in the habit of answering to myself :

I would have answered earlier but I was on vacation :-)

> Here is a patch to msvc-tools.jam that implements support for
> feature struct-alignment, as documented in features.jam
>
> http://boost.org/tools/build/v1/features.jam
>
> G:\boost_1_32_0\tools\build\v1> diff orig.jam msvc-tools.jam
> 81a82,87
> > flags msvc CFLAGS <struct-alignment>1 : /Zp1 ;
> > flags msvc CFLAGS <struct-alignment>2 : /Zp2 ;
> > flags msvc CFLAGS <struct-alignment>4 : /Zp4 ;
> > flags msvc CFLAGS <struct-alignment>8 : /Zp8 ;
> > flags msvc CFLAGS <struct-alignment>16 : /Zp16 ;
> > flags msvc CFLAGS <struct-alignment>auto : ;
> >

I'll add that in, thanks.

> Is there a better way to do this ?

If by better you mean without modifying msvc-tools.jam. You could add
the option generically:

   bjam -sTOOLS=vc-7_1 "-sBUILD=debug <cflags>/Zp1" -a -d+2

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net