[CMake] [boost][b2] Differenciate 32bit and 64 bit binaries when using CMake.

Miller, Frank FMiller at sjm.com
Thu Oct 11 07:29:04 EDT 2012


A simple solution would be to install only the 64bit version of boost into a new directory and change the environment variable to point there. Then FindBoost will only be able to see the version you want.

Frank

________________________________
From: cmake-bounces at cmake.org [cmake-bounces at cmake.org] on behalf of Klaim - Joël Lamotte [mjklaim at gmail.com]
Sent: Thursday, October 11, 2012 5:16 AM
To: Boost users list; cmake at cmake.org
Subject: [CMake] [boost][b2] Differenciate 32bit and 64 bit binaries when using CMake.

I am having a problem with b2 on Windows using Visual Studio (2010 & 2012 but it is irrelevant):
Until now I was building boost with b2 in a way that would first build 32 bit version in the default library directory, then the 64bit version in lib/64 .
I wasn't using the 64bit version until this morning so I didn't get any problem whatever my use of boost was.
I often use Cmake these days and I set the boost environment variables for FindBoost CMake script to find it.

My problem is that I'm trying now to use the 64 bit version now and CMake FindBoost script will only find the 32 bit version.
CMake correctly assume that the library files in the lib directory are the one to use, however it have no apparent way to
find if it is for 64 or 32 bit.

Now I'm not sure how to fix this.
I see two solutions but I don't see how to apply them:

1. make b2 generate lib and dll files with an additional indication on if it's 64 or 32 bit address model.
I didn't find such option in b2 --help so I assume that it is not possible?

2. find a way for CMake FindBoost to automatically find the 64 bit binaries instead of the 32 bit binaris.
I don't see a clear solution to achieve this, because it depends a lot on how boost have been compiled.

Note: I don't want to use a default boost installation, I want to use my custom build.


Any advice on how I should proceed?

Thanks for your patience.

Joel Lamotte

This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121011/e80ca246/attachment.htm>


More information about the CMake mailing list