|
Boost Interest : |
Subject: Re: [Boost-cmake] boost 1.41.0-cmake0 and CMake 2.6.4 - The usual, CMake can not find boost.
From: Philip Lowman (philip_at_[hidden])
Date: 2009-12-04 17:23:17
On Fri, Dec 4, 2009 at 1:02 PM, troy d. straszheim <troy_at_[hidden]> wrote:
> 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.
Not that I don't appreciate all of the hard work being done getting
Boost to build with CMake, but is making a "clean break with the past"
really a good idea here? That is to say, wouldn't it be easier on
everyone if the CMake build of Boost matched the bjam defaults
(especially when it comes to filename/path issues)?
-- Philip Lowman