[CMake] Can FindBoost.cmake support STLport

Philip Lowman philip at yhbt.com
Fri Feb 13 09:35:47 EST 2009


On Fri, Feb 13, 2009 at 8:46 AM, Michael Jackson <
mike.jackson at bluequartz.net> wrote:

> Patch attached and also added to the bug report. Actually since it was part
> of the "ABI" tag it was fairly simple to fix. Now wee need some volunteers
> to test the patch/fix.


I considered the same patch.  Because _boost_ABI_TAG is not used during
RELEASE you would miss this case below:

boost_thread-vc80-mt-p-1_38.lib
boost_thread-vc80-mt-p.lib

One approach would be to make _boost_ABI_TAG be what it should be, the ABI
tags, and get rid of _boost_STATIC_TAG.  I haven't done much work here but I
was thinking building up two versions of the ABI_TAG, one for RELEASE and
one for DEBUG incrementally in the order the options are defined by Boost...


  set( _boost_ABI_TAG       "-")
  set( _boost_ABI_TAG_DEBUG "-")
  # Build the ABI tag in the following order
  #   "s"  =>  linking statically to the C++ standard library and compiler
  #            runtime support libraries (MSVC)
  if(WIN32 AND Boost_USE_STATIC_LIBS )
    set( _boost_ABI_TAG       "${_boost_ABI_TAG}s")
    set( _boost_ABI_TAG_DEBUG "${_boost_ABI_TAG_DEBUG}s")
  endif()
  #   "g"  =>  using debug versions of the standard and runtime support
  #            libraries
  if(WIN32 AND MSVC)
    set( _boost_ABI_TAG_DEBUG "${_boost_ABI_TAG_DEBUG}g")
  endif()
  #   "y"  =>  using special debug build of Python
  #            libraries
etc.

Then the actual find_library check could be simplified and the code would
also be far more readable.  Please feel free to complete the patch if you
like this approach and have time.

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090213/1affe6da/attachment.htm>


More information about the CMake mailing list