Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses #21.
Summary
For Windows platforms only, the CMake targets are now split into 2; The default
mio::mio
target and a newmio::mio_full_winapi
target. The default target definesWIN32_LEAN_AND_MEAN
andNOMINMAX
as compiler flags, while themio::mio_full_winapi
target defines neither of these. I've also updated the docs with instructions for Windows users.A word of caution, this may be a breaking change for existing builds that incorporate Mio into applications using the Windows API. This is because the definitions have now been moved into the compiler flags (instead of being defined in-line, within the source). In this case, those applications would have to use the
mio::mio_full_winapi
target, instead.I've tested this on MSVC MSVC 19.14.26429.4 (Windows), and Clang 6.0.1 / 8.0.0 (FreeBSD)