http://www.boost.org/doc/libs/1_66_0/libs/config/doc/html/index.html
http://www.boost.org/doc/libs/1_66_0/libs/log/doc/html/log/installation/config.html
http://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/utf_reference/link_references/link_boost_test_dyn_link.html
All libraries either prefer or require defining this flag if dynamic boost library is linked. I believe this should be exported as part of dependencies' compile_args. Probably more granular approach can be used to export only BOOST_{LIB}_DYN_LINK for boost modules that were requested.
What is this for - what happens if you don't set this? I have never seen this set in practice, so I'm wondering if this is specific to windows and/or autolink.
Please take a look on boost test case. boost::log is one of the best examples because it is library with multiple build modes and linkage modes. In the test we have to define BOOST_LOG_DYN_LINK since we are linking with shared library, we must not define it if we are linking with static version. In my opinion since meson knows that we are linking with shared version of boost_log, BOOST_LOG_DYN_LINK should be exported as compiler_args of dependency automatically, and user does not need to specify that.
2nd question: no, it is not windows specific at all.
https://github.com/sarum9in/meson/pull/7 this is roughly implementation I want. Just a prototype for now, we still need to fix #3082 before we can test it properly.
Most helpful comment
Please take a look on boost test case.
boost::logis one of the best examples because it is library with multiple build modes and linkage modes. In the test we have to defineBOOST_LOG_DYN_LINKsince we are linking with shared library, we must not define it if we are linking with static version. In my opinion since meson knows that we are linking with shared version of boost_log,BOOST_LOG_DYN_LINKshould be exported ascompiler_argsof dependency automatically, and user does not need to specify that.2nd question: no, it is not windows specific at all.