[CMake] FindBoost not setting Boost_LIBRARIES

McNamara, Nate nate.mcnamara at rbccm.com
Tue May 11 19:06:44 EDT 2010


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})

H:\devel\build>mkdir devenv

H:\devel\build>cd devenv

H:\devel\build\devenv>cmake ..
-- Building for: Visual Studio 8 2005
-- Check for working C compiler using: Visual Studio 8 2005
-- Check for working C compiler using: Visual Studio 8 2005 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 8 2005
-- Check for working CXX compiler using: Visual Studio 8 2005 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:373 ] Boost not in cache
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:376 ] _boost_TEST_VERSIONS =
1.42;1.42.0;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38
;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.
33.1;1.3
3.0;1.33
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:378 ]
Boost_USE_MULTITHREADED = TRUE
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:380 ] Boost_USE_STATIC_LIBS
= on
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:439 ] Declared as CMake or
Environmental Variables:
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:441 ]BOOST_ROOT = C:/Program
Files/boost/boost_1_42
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:443 ]BOOST_INCLUDEDIR =
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:445 ]BOOST_LIBRARYDIR =
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:447 ] _boost_TEST_VERSIONS =
1.42;1.42.0;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38
;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.
33.1;1.3
3.0;1.33
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:496 ] Include debugging
info:
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:498
]_boost_INCLUDE_SEARCH_DIRS = C:/Program
Files/boost/boost_1_42/include;C:/Program
Files/boost/boost_1_42;C:/boost/include;C:/boost;C:\Program
Files/boost/include;C:\Program Files/boost;/sw/local/include
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:500 ]
_boost_PATH_SUFFIXES =
boost-1_42;boost_1_42;boost-1_42_0;boost_1_42_0;boost-1_4
1_0;boost_1_41_0;boost-1_41;boost_1_41;boost-1_40_0;boost_1_40_0;boost-1
_40;boos
t_1_40;boost-1_39_0;boost_1_39_0;boost-1_39;boost_1_39;boost-1_38_0;boos
t_1_38_0
;boost-1_38;boost_1_38;boost-1_37_0;boost_1_37_0;boost-1_37;boost_1_37;b
oost-1_3
6_1;boost_1_36_1;boost-1_36_0;boost_1_36_0;boost-1_36;boost_1_36;boost-1
_35_1;bo
ost_1_35_1;boost-1_35_0;boost_1_35_0;boost-1_35;boost_1_35;boost-1_34_1;
boost_1_
34_1;boost-1_34_0;boost_1_34_0;boost-1_34;boost_1_34;boost-1_33_1;boost_
1_33_1;b
oost-1_33_0;boost_1_33_0;boost-1_33;boost_1_33
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:524 ] location of
version.hpp: C:/Program Files/boost/boost_1_42/boost/version.hpp
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:543 ] version.hpp reveals
boost 1.42.0
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:634 ] guessed
_boost_COMPILER = -vc80
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:644 ] _boost_MULTITHREADED =
-mt
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:661 ] _boost_STATIC_TAG = -s
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:663 ] _boost_ABI_TAG = gd
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:696 ]
_boost_LIBRARIES_SEARCH_DIRS = C:/Program
Files/boost/boost_1_42/lib;C:/Program
Files/boost/boost_1_42/stage/lib;C:/Program
Files/boost/boost_1_42/lib;C:/Program
Files/boost/boost_1_42/../lib;C:/boost/lib;C:/boost;C:\Program
Files/boost/boost
_1_42_0/lib;C:\Program Files/boost/boost_1_42/lib;C:\Program
Files/boost/lib;C:\Program Files/boost;/sw/local/lib
-- [ C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:830 ] Boost_FOUND = TRUE
-- Boost version: 1.42.0
-- Boost_VERSION=104200
-- Boost_LIBRARIES=
-- Boost_LIBRARY_DIRS=C:/Program Files/boost/boost_1_42/lib
-- Boost_INCLUDE_DIRS=C:/Program Files/boost/boost_1_42
-- Configuring done
-- Generating done
-- Build files have been written to: H:/devel/build/devenv
________________________________________

This E-Mail (including any attachments) may contain privileged or confidential information.  It is intended only for the addressee(s) indicated above.

The sender does not waive any of its rights, privileges or other protections respecting this information.  

Any distribution, copying or other use of this E-Mail or the information it contains, by other than an intended recipient, is not sanctioned and is prohibited.

If you received this E-Mail in error, please delete it and advise the sender (by return E-Mail or otherwise) immediately. 

This E-Mail (including any attachments) has been scanned for viruses. 

It is believed to be free of any virus or other defect that might affect any computer system into which it is received and opened. 

However, it is the responsibility of the recipient to ensure that it is virus free. 

The sender accepts no responsibility for any loss or damage arising in any way from its use.

E-Mail received by or sent from RBC Capital Markets is subject to review by Supervisory personnel. 

Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information.

IRS CIRCULAR 230 NOTICE:  TO COMPLY WITH U.S. TREASURY REGULATIONS, WE ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVICE INCLUDED IN THIS COMMUNICATION IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY ANY TRANSACTION OR MATTER.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100511/021f958a/attachment.htm>


More information about the CMake mailing list