MantisBT - CMake
View Issue Details
0011246CMakeCMakepublic2010-09-18 11:152010-11-09 22:57
Philip Lowman 
Philip Lowman 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.3CMake 2.8.3 
0011246: FindBoost can find shared libraries (.so) even when Boost_USE_STATIC_LIBS is set
When Boost_USE_STATIC_LIBS is set, FindBoost has a bug in it where it can still find shared libraries (.so) files in some rare circumstances.

The circumstances which exhibit this bug is a situation like below.
If the user were to delete libboost_system-mt.a FindBoost would find libboost_system-mt.so. The reason why is the CMAKE_FIND_LIBRARY_SUFFIXES variable is set to search ".a" then ".so" when Boost_USE_STATIC_LIBS is true. CMake searches every filename in the list first for a ".a" and then for a ".so".

Most users shouldn't encounter this bug unless they are doing something strange to their installed boost libraries.

libboost_system-mt.a (Delete this file, and FindBoost finds "libboost_system-mt.so")
libboost_system-mt.so
libboost_system.a
libboost_system.so
No tags attached.
Issue History
2010-09-18 11:15Philip LowmanNew Issue
2010-09-18 11:15Philip LowmanStatusnew => assigned
2010-09-18 11:15Philip LowmanAssigned To => Philip Lowman
2010-09-18 11:16Philip LowmanTarget Version => CMake 2.8.3
2010-09-18 11:17Philip LowmanNote Added: 0022261
2010-09-18 11:17Philip LowmanStatusassigned => resolved
2010-09-18 11:17Philip LowmanFixed in Version => CMake 2.8.3
2010-09-18 11:17Philip LowmanResolutionopen => fixed
2010-11-09 22:57Philip LowmanStatusresolved => closed

Notes
(0022261)
Philip Lowman   
2010-09-18 11:17   
Will be fixed in 2.8.3 RC2