|
Boost Interest : |
Subject: Re: [Boost-cmake] boost 1.41.0-cmake0 and CMake 2.6.4 - The usual, CMake can not find boost.
From: troy d. straszheim (troy_at_[hidden])
Date: 2009-12-04 13:02:35
Michael Jackson wrote:
> Pulled the latest boost 1.41.0cmake0, compiled and installed. Then I
> tried to have my CMake based project find Boost. As usual, this failed.
> Using CMake 2.6.4 currently. Started debugging into the FindBoost.cmake
> file and here is what I am finding out:
>
> _boost_INCLUDE_SEARCH_DIRS =
> /Users/Shared/Toolkits/boost-1_41/include;
> /Users/Shared/Toolkits/boost-1_41;
> C:/boost/include;
> C:/boost;
> /boost;
> /sw/local/include
>
> _boost_PATH_SUFFIXES =
> boost-1_41;
> boost-1_41_0;
>
> Of course boost headers are installed into
> /Users/Shared/Toolkits/boost-1_41/include/boost-1.41.0
>
> So this piece of code renders that useless:
>
> # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0
> IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
> STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3"
> _boost_BOOSTIFIED_VERSION ${_boost_VER})
> ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+")
> STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2"
> _boost_BOOSTIFIED_VERSION ${_boost_VER})
> ENDIF()
>
> This was probably for the older versions of boost? Or maybe the ones
> built with bjam? This is the first time actually trying to build Boost
> with CMake. Not really a great start. If I look back at boost 1.36, 1.39
> and 1.40 all built with BJam the include directory follows the
> boost-1_XX pattern.
>
> Was the deviation intentional? A bug in the Boost/CMake files? Help
> is appreciated.
Try these docs:
http://sodium.resophonic.com/boost-cmake/1.41.0.cmake0/doc/exported_targets.html
YMMV. The underscores were something that bjam did. I'd really like to
make a clean break with the past, I have ideas but nothing too firm yet.
-t