[CMake] cmake 2.6.4 won't find boost 1.40 on windows

James C. Sutherland James.Sutherland at utah.edu
Thu Sep 17 17:21:19 EDT 2009


 From FindBoost.cmake:

# These last three variables are available also as environment  
variables:
#
#   BOOST_ROOT or BOOSTROOT      The preferred installation prefix for  
searching for
#                                Boost.  Set this if the module has  
problems finding
#                                the proper Boost installation.

Did you try setting one of these variables?



On Sep 17, 2009, at 2:48 PM, Cristian Adam wrote:

> Hi,
>
> I have encountered problems with Boost 1.40 (build on Windows using
> Visual Studio 2008 and MinGW GCC 4.4.0) with CMake 2.6.4.
>
> Boost was compiled for Visual Studio 2008 like this:
> bjam --build-dir=c:\temp\boost toolset=msvc --build-type=complete  
> install
> and for MinGW GCC like this:
> bjam --build-dir=c:\temp\boost toolset=gcc --build-type=complete  
> install
>
> Adding set(Boost_ADDITIONAL_VERSIONS "1.40" "1.40.0") didn't fix the
> problem.
>
> The problem is due to the fact that Boost 1.40 was installed to
> c:\boost\include\boost-1_40\ and according to FindBoost.cmake module  
> lines 292 to 300:
>
>     FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
>       # Add in a path suffix, based on the required version, ideally
>       # we could read this from version.hpp, but for that to work we'd
>       # need to know the include dir already
>       if (WIN32 AND NOT CYGWIN)
>         set(_boost_PATH_SUFFIX boost_${_boost_VER})
>       else (WIN32 AND NOT CYGWIN)
>         set(_boost_PATH_SUFFIX boost-${_boost_VER})
>       endif (WIN32 AND NOT CYGWIN)
>
> Boost should have been installed into c:\boost\include\boost_1_40\.
>
> Was Boost before version 1.40 installed into "boost_1_3x" for Visual  
> Studio and MinGW?
> If so how should version 1.40 be detected for Visual Studio and MinGW?
>
> I have tested two solutions to this problem:
>
> 1. rename c:\boost\include\boost-1_40\ to c:\boost\include\boost_1_40\
> 2. use set(BOOST_INCLUDEDIR "c:/boost/include/boost-1_40"
>
> The following cmake change:
> http://www.cmake.org/pipermail/cmake-commits/2009-August/006975.html
> will remove the "set(Boost_ADDITIONAL_VERSIONS "1.40" "1.40.0")"  
> statement but it won't fix the
> underscore problem for Visual Studio and MinGW Boost compilations!
>
> Cheers,
> Cristian.
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090917/abbeae8b/attachment.htm>


More information about the CMake mailing list