[CMake] FindBoost.cmake issue while targeting 32-bit build on Linux 64-bit

Klaim - Joël Lamotte mjklaim at gmail.com
Thu Apr 23 14:58:49 EDT 2015


I believe that this issue is with Boost not having a way to specify which
target architecture is the build,
which prevent any CMake script to be able to identify which build is
installed.
Assuming that the build arch is the same than the OS is not useful on
Windows where most applications
still need to support 32 bit even if a majority of people are using 64bit
verisons of the OS.

I pointed the issue several time in the past:
https://svn.boost.org/trac/boost/ticket/10141
There was a recent discussion on this subject too, not sure if something
changed but there
are some solutions possible:

http://boost.2283326.n4.nabble.com/1-58-0-Release-candidates-available-tp4674168p4674196.html

http://boost.2283326.n4.nabble.com/boost-config-context-log-1-58-address-model-and-architecture-detection-td4674125.html



On Thu, Apr 23, 2015 at 2:27 PM, Mateusz Loskot <mateusz at loskot.net> wrote:

> Hi,
>
> Here is the situation outlined:
> - project has Boost as optional dependency
> - running CMake on Linux 64-bit to build 32-bit binaries
> - CXXFLAGS=-m32 is specified
> - Boost 64-bit binaries are installed
> - Boost 32-bit binaries are *not* installed
>
> Expected result:
> - Boost 32 is not found, Boost is *not* enabled
> - 32-bit build is configured without Boost at all
> - success
>
> Actual result:
> - Boost 64 is found, Boost is enabled
> - 32-bit build is configured to link against Boost 64-bit libraries
> - failure
>
> Am I missing anything in the build configuration
> or FindBoost.cmake is unable to do what I expect it to do,
> by design or by a bug?
>
> Best regards,
> --
> Mateusz  Loskot, http://mateusz.loskot.net
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150423/2c83d86e/attachment.html>


More information about the CMake mailing list