On Wed, May 13, 2009 at 6:41 AM, troy d. straszheim <t...@resophonic.com> 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 there’s 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 problems. Frankly, I think the Boost.Test library is way out of line here: why should shared vs. static linking change what features the library provides? Other ideas for a fix to this problem would be helpful! I'm stumped. - Doug _______________________________________________ Boost-cmake mailing list Boost-cmake@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-cmake