[CMake] FindBoost not setting Boost_LIBRARIES
Michael Hertling
mhertling at online.de
Tue May 11 20:31:48 EDT 2010
On 05/12/2010 01:06 AM, McNamara, Nate wrote:
> Hello!
>
> I've been struggling with find_package(boost ...): although it succeeds
> up to a point, it doesn't finish the job. I must be doing something
> wrong.
>
> The output below shows that boost is found, and several of the expected
> variables are set, but Boost_LIBRARIES is not. I suspect that means
> that, although the boost installation was found, the particular
> component (i.e., the unit_test_framework) was not.
>
> The weird thing is that, when I get to the link step, link knows the
> exact file name it should link, but doesn't find it:
>
> 1>LINK : fatal error LNK1104: cannot open file
> 'libboost_unit_test_framework-vc80-mt-gd-1_42.lib'
>
> Any hints much appreciated!
> Nate
>
>
>
> H:\devel\build>type CMakeLists.txt
> cmake_minimum_required(VERSION 2.8)
> project(foo)
>
> set(Boost_DEBUG TRUE)
> find_package(boost REQUIRED COMPONENTS unit_test_framework)
> message(STATUS "Boost_VERSION=" ${Boost_VERSION})
> message(STATUS "Boost_LIBRARIES=" ${Boost_LIBRARIES})
> message(STATUS "Boost_LIBRARY_DIRS=" ${Boost_LIBRARY_DIRS})
> message(STATUS "Boost_INCLUDE_DIRS=" ${Boost_INCLUDE_DIRS})
Is the lower-case "b" in "find_package(boost ...)" just a typo? On
Linux, this CMakeLists.txt file fails completely as Boost must be
requested with upper-case "B", i.e. "find_package(Boost ...)".
Additionally, I get the following:
[...]
-- Boost version: 1.43.0
-- Found the following Boost libraries:
-- unit_test_framework
-- Boost_VERSION=104300
[..]
The line containing "Found the following..." and the subsequent list of
detected Boost libraries are missing in your log. Furthermore, I can
reproduce your results by issuing "find_package(Boost)", i.e. by not
requesting any of Boost's libraries. Perhaps, this somewhat helps.
Regards,
Michael
More information about the CMake
mailing list