Closed Neurochrom closed 6 years ago
Thank you. I'm busy until Thursday, but have to mention that I do not wish to add MSVC support to the build system before MSVC gets a -fno-access-control
equivalent flag for building the tests. The current CMakeLists.txt files are for building the examples and tests using clang or gcc only. Most users of this library would use their own build setup to add the boost and openssl libraries needed, and include the headers of this library in their source code. This applies to MSVC users as well. That said, it is interesting to know if the tests eventually pass using MSVC after manual/scripted modification of the access control in the header files. I know they do pass on MSYS2 using gcc last time I tried.
As a side note, I have read that Clang for Windows is getting increasingly stable and feature complete, and might be worth checking out.
Also, to suppress warnings on MSVC, you can include the headers in this library as system includes.
Hi Ole, Thanks for your answer and the project in general ;) I made all the tests build with MSVC even without -fno-access-control. Not all of the asserts pass though. But still this might help a lot of MSVC users, and MSVC is arguably a huge C++ platform.
Hopefully, this commit solves the issue, although I had to disable some tests for now (until Microsoft comes to their senses and adds an option to disable access control): https://github.com/eidheim/Simple-Web-Server/commit/5a7c021dab6de484590a45701e8eab29b1a7b718
Tested on Visual C++ 2017 (15.3) Community Edition, boost 1.65.1, OpenSSL 1.1.0, Cmake 3.9.3 - everything builds, but not all tests pass yet. Some additional minor changes are: