[CMake] Boost system library

Bart Janssens bart.janssens at lid.kviv.be
Sun Mar 15 12:03:20 EDT 2009


On Fri, Mar 13, 2009 at 1:13 PM, Geir Erikstad <geirr at baldr.no> wrote:
> 09/3/13 Philip Lowman <philip at yhbt.com>:
>> I've logged a bug report for it here.  I'm pretty sure the best fix would be
>> to get FindBoost to ignore the system component when it's detected a version
>> less than 1.35.  I've attached a new FindBoost.cmake to the bug report which
>> does this, if you could give it a shot?
>>
>> http://public.kitware.com/Bug/view.php?id=8734

Thanks, I can confirm this works.

> As an alternative to the "crappier workaround" you could run find_package twice,
> first to get the version number, and then to get the modules you want:
>
> find_package(Boost)
> set(local_boost_version "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}")
> if (${local_boost_version} VERSION_LESS "1.35")
>    find_package(Boost COMPONENTS filesystem)
> else()
>    find_package(Boost COMPONENTS system filesystem)
> endif()

Thanks, I'll use this workaround until the patched FindBoost makes it
into a CMake release.

Cheers,

-- 
Bart


More information about the CMake mailing list