View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007303CMakeModulespublic2008-07-08 07:302008-07-08 09:47
ReporterAlexander Bubnov 
Assigned ToDouglas Gregor 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in VersionCMake-2-6 
Summary0007303: CMake latest: Boost_LIBRARIES is not set
Descriptioncmake/CMakeExample> cat CMakeLists.txt
cmake_minimum_required(VERSION 2.6)

project (trial)
find_package(Boost)
message("Boost_LIBRARIES: " ${Boost_LIBRARIES})

cmake/CMakeExample> rm CMakeCache.txt ; cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.33.1
-- Found the following Boost libraries:
Boost_LIBRARIES:
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alek/trial/cmake/CMakeExample

As you can see Boost_LIBRARIES is empty, but

man cmake says:

Boost_LIBRARIES Link these to use the Boost libraries that you specified, not cached
TagsNo tags attached.
Attached Filestxt file icon CMakeLists.txt [^] (121 bytes) 2008-07-08 07:30 [Show Content]

 Relationships

  Notes
(0012650)
Alexander Bubnov (reporter)
2008-07-08 09:23

it would be greate if the fix of this bug can be in latest.
(0012654)
Douglas Gregor (developer)
2008-07-08 09:47

This is expected behavior. Boost_LIBRARIES gives you the libraries you need to link against, but it only does so if you've asked the Boost module to find specific libraries, e.g., "filesystem", using the COMPONENTS argument to FindPackage:

  find_package(Boost COMPONENTS filesystem)

 Issue History
Date Modified Username Field Change
2008-07-08 07:30 Alexander Bubnov New Issue
2008-07-08 07:30 Alexander Bubnov File Added: CMakeLists.txt
2008-07-08 09:23 Alexander Bubnov Note Added: 0012650
2008-07-08 09:35 Bill Hoffman Status new => assigned
2008-07-08 09:35 Bill Hoffman Assigned To => Douglas Gregor
2008-07-08 09:47 Douglas Gregor Status assigned => closed
2008-07-08 09:47 Douglas Gregor Note Added: 0012654
2008-07-08 09:47 Douglas Gregor Resolution open => no change required
2008-07-08 09:47 Douglas Gregor Fixed in Version => CMake-2-6


Copyright © 2000 - 2018 MantisBT Team