[CMake] cmake can't find boost

James C. Sutherland James.Sutherland at utah.edu
Wed Sep 2 10:41:18 EDT 2009


On Sep 2, 2009, at 3:27 AM, Tim Chan wrote:

> I am getting the error:
>
> -- Boost version required: 1.35.0. Found: ..
> CMake Error at /usr/share/cmake-2.6/Modules/FindBoost.cmake:553  
> (MESSAGE):
>   Couldn't find the Boost libraries and/or include directory, or the  
> version
>   found is too old.  Please install the Boost libraries AND  
> development
>   packages.  You can set BOOST_ROOT, BOOST_INCLUDEDIR and  
> BOOST_LIBRARYDIR to
>   help find Boost.
> Call Stack (most recent call first):
>   cmake/SearchForStuff.cmake:184 (FIND_PACKAGE)
>   CMakeLists.txt:68 (INCLUDE)
>
> I am running ubuntu 8.10, CMake 2.6-patch 0, and boost 1.40.
>
> I have boost installed in /usr/local/boost_1_40_0
>
> I set the following variables:
>
> export BOOST_ROOT=/usr/local/boost_1_40_0
> export BOOST_INCLUDEDIR=/usr/local/boost_1_40_0/boost
> export BOOST_LIBRARYDIR=/usr/local/boost_1_40_0/libs
>
> but CMake is still unable to find boost. I know this is a semi- 
> common problem but I couldn't find an adequate fix. Any suggestions?
>

Did you try something like:
   set(Boost_ADDITIONAL_VERSIONS "1.40" "1.40.0" )
The FindBoost.cmake file is somewhat out of date in the versions it  
looks for by default.




More information about the CMake mailing list