[cmake-developers] [CMake 0013244]: components are append to Boost_LIBRARIES

Mantis Bug Tracker mantis at public.kitware.com
Wed May 23 05:03:45 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13244 
====================================================================== 
Reported By:                dam
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13244
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2012-05-23 05:03 EDT
Last Modified:              2012-05-23 05:03 EDT
====================================================================== 
Summary:                    components are append to Boost_LIBRARIES
Description: 
When using FindBoost in the same CMakeLists.txt and with different components,
the variable Boost_LIBRARIES contains the union of the components.

I think that Boost_LIBRARIES variable should be cleared when each time
find_package(Boost ...) is invoked, or perhaps the doc should mentioned this
behavior.

Steps to Reproduce: 
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

project(foo)

find_package(Boost COMPONENTS thread)
message("boost libs: ${Boost_LIBRARIES}")

find_package(Boost COMPONENTS date_time)
message("\nboost libs: ${Boost_LIBRARIES}")

# the result is:
# boost libs: /usr/lib/libboost_thread-mt.so
#
# boost libs: /usr/lib/libboost_thread-mt.so;/usr/lib/libboost_date_time-mt.so

# but I think it should be:
# boost libs: /usr/lib/libboost_date_time-mt.so
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-05-23 05:03 dam            New Issue                                    
======================================================================




More information about the cmake-developers mailing list