-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 04 Nov 2010 04:35:57 -0400
cmake-requ...@cmake.org wrote:
> Hi all~

Hi Kent.

> I have a project using Boost that should compile for both 64bit and
> 32bit on a 64bit host.  This works fine for a 64bit target, but I
> can't get this to work for a 32bit target.

I'm having problems linking Boost too. But enough about me.

> In order to compile for 32bit on a 64bit host, I have a -D parameter
> called BUILD64.  Here is my logic to initialize this var:
> 
> if( WIN32 )
>       set( BUILD64 ${CMAKE_CL_64} )
> else()
>       option( BUILD64 "Build a 64-bit product" OFF )
>       if( BUILD64 )
>               message( STATUS "64-bit build" )
>       endif( )
> endif()

Are you sure this logic is right? It looks very odd. Does CMake set
WIN32 for a 64-bit Windows toolchain? Didn't you say you were building
on Linux?

> The syntax for finding boost is thus:
> set( Boost_USE_MULTITHREADED ON )
> set( Boost_USE_STATIC_LIBS   ON )
> set( Boost_DETAILED_FAILURE_MSG   ON )
> # set( Boost_DEBUG ON )
> find_package( Boost 1.33.0 COMPONENTS program_options )

You don't set ADDITIONAL_VERSIONS. That's probably not the problem.
IIRC, it's:

set(Boost_ADDITIONAL_VERSIONS "1.44 1.44.0")

... if you wanted to try it anyway.

Regards,
Adam J Richardson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkzSgx0ACgkQSUH6dLOqvqmfKwCg6qttDVOXnpqHYoZwfjzUyHax
ubMAniQAF6EYxsIUYkqXPQiMwFxop6uB
=ngaQ
-----END PGP SIGNATURE-----
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to