Boost logo

Boost-Build :

Subject: Re: [Boost-build] [CMake] FindBoost: find both win32 and x64 static libs
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-12-05 17:16:57


> -----Original Message-----
> From: philiplowman_at_[hidden] [mailto:philiplowman_at_[hidden]] On Behalf
> Of Philip Lowman
> Sent: 05 December 2010 04:54
> To: Hicham Mouline
> Cc: Philip Lowman; CMake mailing list
> Subject: Re: [CMake] FindBoost: find both win32 and x64 static libs
>
> On Saturday, December 4, 2010, Hicham Mouline <hicham_at_[hidden]>
> wrote:
> >
> > I was wrong. Dmytro pointed out that bjam allows building boost
> > libraries with the compiler and bitness in the boost library name --
> layout=versioned.
> >
> > Therefore, I could have both 32 and 64bit versions in the same
> > directory.
> >
> > I wonder then if FindBoost is able to detect automatically the
> > right ones based on the name of the libs.
>
> I could probably add this feature, I'm pretty sure there isn't support
> for it now. Could you create a feature request on the CMake bug
> tracker and include what the filenames look like when generated by
> visual studio?
>
> If you want to try to patch FindBoost yourself, please make sure
> you're playing with the version from 2.8.3.
>
> http://www.cmake.org/Bug
> Philip Lowman

I've built both win32 and x64 versions of boost thread library with the
following 2 lines:

1. 32bit cl.exe from msvc9 directory in the %PATH%
bjam --with-thread --layout=versioned toolset=msvc address-model=64
variant=release link=static threading=multi runtime-link=shared

2. 64bit cl.exe from msvc9 directory in the %PATH%
bjam --with-thread --layout=versioned toolset=msvc address-model=64
variant=release link=static threading=multi runtime-link=shared

however, the resulting .lib files have identical names however:
libboost_thread-vc90-mt-1_44.lib
libboost_thread-vc90-mt.lib

Dmytro, there is no distinction between 32bit and 64bit. The 64bit lib size
is approximately double the 32bit lib.

boost-build, how to change this to include the bitness in the boost lib
name?
If it's impossible, Philip, perhaps FindBoost could be changed to allow for
different directories under BOOST_ROOT for the lib directories, something
like lib\win32 and lib\x64 or whatever names can be agreed on.

rds,


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