Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support BOOST_UNIT_TEST_FRAMEWORK_DYN_LINK et al #198

Closed
pdimov opened this Issue Jan 22, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@pdimov
Copy link
Contributor

pdimov commented Jan 22, 2019

The CMake config files that b2 install installs automatically define BOOST_${LIBNAME}_DYN_LINK=1 when the user links to the dynamic library $LIBNAME, by means of linking to the Boost::$libname target. This works most of the time, because the target/library name and the macro match, but doesn't for Boost::unit_test_framework, Boost::test_exec_monitor and Boost::prg_exec_monitor, because these use the macro BOOST_TEST_DYN_LINK and this doesn't match the target names.

So, would it be possible to make the libraries recognize their individual macros in addition to BOOST_TEST_DYN_LINK?

@raffienficiaud raffienficiaud self-assigned this Mar 2, 2019

@raffienficiaud

This comment has been minimized.

Copy link
Member

raffienficiaud commented Mar 3, 2019

Currently building on the branch topic/GH-198-support-boost-cmake-in-b2. Would be good if you can give a try.

@pdimov

This comment has been minimized.

Copy link
Contributor Author

pdimov commented Mar 5, 2019

I can confirm that without the fix, building https://github.com/boostorg/boost_install/tree/develop/test/test with BUILD_SHARED_LIBS=ON fails with link errors for missing main, but with the fix, it succeeds.

@raffienficiaud

This comment has been minimized.

Copy link
Member

raffienficiaud commented Mar 5, 2019

Very good, thanks for the feedback. Let's try to push that for 1.70.

raffienficiaud added a commit that referenced this issue Mar 5, 2019

Merge branch 'topic/GH-198-support-boost-cmake-in-b2' into next-internal
* topic/GH-198-support-boost-cmake-in-b2:
  Change log
  Making the dynamic link aware of the b2/cmake defines

@raffienficiaud raffienficiaud added this to the 1.70 milestone Mar 7, 2019

@raffienficiaud raffienficiaud added 1.70 and removed develop labels Mar 7, 2019

@raffienficiaud

This comment has been minimized.

Copy link
Member

raffienficiaud commented Mar 7, 2019

In master, should be in 1.70.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.