Boost Interest :
Subject: Re: [Boost-cmake] Creating "Known Issues": CMake Problems with boost 1.39
From: Doug Gregor (doug.gregor_at_[hidden])
Date: 2009-05-13 11:41:11
On Wed, May 13, 2009 at 6:41 AM, troy d. straszheim <troy_at_[hidden]> wrote:
> Tan, Tom (Shanghai) wrote:
>> This is a re-post from the boost-users list, Thanks to Troy d. straszheim
>> who reminded me there that theres a dedicated list here.
> Good to see you over here
>> I used CMake to build boost 1.39 and found at least two problems:
>> - In the cmakelist.txt file the BOOST_VERSION_MINOR is 38, instead of 39
> A known problem. You can tweak this in the toplevel CMakeLists.txt. Look
> for BOOST_VERSION_MINOR. I will also sooner or later put up a git branch
> containing all the patches we collect.
>> - The generated boost.test libs have an additional -s to the file
>> names, ex. libboost_unit_test_framework-vc90-mt-1_39-s.lib, instead of
>> libboost_unit_test_framework-vc90-mt-1_39.lib. This will cause a linking
>> error while using boost.test. this does not happen to the bjamed results.
> In the cmakefiles I see
> # If the STATIC_TAG flag was set, we append "-s" to the name of
> # the library. This is an unfortunate hack, needed only for the
> # test library.
> if (THIS_LIB_STATIC_TAG)
> set(THIS_LIB_STATIC_TAG "-s")
> But I don't remember all the details of the hack, and I wonder if I can just
> create a patched version that removes this. Can you just refer to
> liblahblah-s from your side?
I think we should use
if (THIS_LIB_STATIC_TAG AND UNIX)
because this problem is Unix-centric and Test-library centric.
Basically, when you have both a shared and a static library "foo" in
the same directory, CMake uses -lfoo and we'll pick up whatever the
linker wants (the shared library). Unfortunately, Boost.Test's static
and shared libraries *have different symbols*, which causes linking
Frankly, I think the Boost.Test library is way out of line here: why
should shared vs. static linking change what features the library
Other ideas for a fix to this problem would be helpful! I'm stumped.