async_comm icon indicating copy to clipboard operation
async_comm copied to clipboard

Portability

Open plusk01 opened this issue 4 years ago • 0 comments

CMake touch ups for portability with MSVC (gross, I know).

  • BOOST_ALL_NO_LIB fixes weird dynamic vs static linking issues (see this and this)
  • By omitting SHARED in add_library, the user gains control via the BUILD_SHARED_LIBS option.
  • since <boost/asio.hpp> and <boost/function.hpp> are included in the public interface, boost includes need to be public, not private (could use PIMPL or maybe forward decl + pointers, but refactor didn't seem worth it)

I wanted the static lib option because building DLLs is a pain. tl;dr GCC exports all symbols by default, MSVC does not. Thought about adding the infrastructure to handle this, but didn't seem worth it.

plusk01 avatar Feb 17 '21 04:02 plusk01