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

Andreas Haferburg ahaferburg at scopis.com
Tue Apr 16 09:16:03 EDT 2013


On 11.10.2012 12:16, Klaim - Joël Lamotte wrote:> 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.

Use a naming convention, e.g. set BOOST_ROOT to "Boost-<version>-<compiler>", where compiler is 
either vs10 or vs10x64. Assuming that Boost is not your only dependency, a naming convention is way 
easier to implement than fixing all the Find*.cmake scripts.

 > I can't guarantee where the boost libraries are installed, that's why I use FindBoost.
Just make the CMake error message clear, e.g. "Boost 1.50 expected to be found in <dir>". Most 
people know how to rename a directory.

Regards
Andreas


More information about the CMake mailing list