Boost logo

Boost Users :

Subject: Re: [Boost-users] [CMake] [boost][b2] Differenciate 32bit and 64 bit binaries when using CMake.
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2013-04-15 10:59:25


On Thu, Oct 11, 2012 at 2:19 PM, Klaim - Joël Lamotte <mjklaim_at_[hidden]>wrote:

> My current understanding is that boost don't have a specific default lib
> dir for different address models, which is the source of the problem as
> FindBoost script can't rely on a protocol to find these lib files.
>
> Am I correct?
>

I am getting back to this because it is becoming more a problem each day
for me:
I have several projects that would benefit from a 64bit version, but still
need to be provided as a 32bit version too.

Apparently setting BOOST_LIBRARYDIR does indeed allow to manually specify
the library directory.
I reported the issue ( http://www.cmake.org/Bug/view.php?id=14087 )that
this is not documented in the help command
or maybe it's because BOOST_LIBRARY_DIRS should be used instead but it
don't work because BOOST_LIBRARY_DIRS
is automatically overriden.

In my specific case, as I need to build either the 32 bit or the 64bit
version of the applications,
I need to specify BOOST_LIBRARYDIR in both cases to be sure the user (other
developers starting helping on the project)
is linking with the correct version instead of relying on BOOST_DIR.
This is not perfect but at least the developer can't ignore the issue.

I am looking for suggestions to improve the situation, either on CMake or
boost,
as I'm not sure what to do exactly. I'm willing to subit patches to both to
ease
development of 32+64bits application using CMake and boost, so
some directions on how to this issue would be useful.

For now I think the simplest solution would be to make b2 use a default
64bit lib directory
when the directory is unspecify. Then FindBoost cmake module can rely on
this knowledge to try to find the right binaries,
based on BOOST_Dir, instead of always using the same binaries by default.

Does it seem like a good solution to you?

Joel Lamotte



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