add_definitions() is for adding "-D" define flags, while "-include" does
not define flags, so let's be explicit and use add_compile_options()
instead.
this change partially reverts
5fb90bb79671b8e22f507728e4b4b948a591f98f.
back then, we were using ubuntu bionic for building windows packages.
but since we've switched to ubuntu focal, where cmake 3.16 is available,
there is no reason to stick with add_definitions() anymore.
Signed-off-by: Kefu Chai <kchai@redhat.com>
include_directories(
${PROJECT_SOURCE_DIR}/src/include/win32)
# Boost complains if winsock2.h (or windows.h) is included before asio.hpp.
- add_definitions(-include winsock_wrapper.h)
+ add_compile_options("SHELL:-include winsock_wrapper.h")
# Boost is also defining some of the errno values, we'll have
# to avoid mismatches.
- add_definitions(-include win32_errno.h)
+ add_compile_options("SHELL:-include win32_errno.h")
endif()
if(FREEBSD)