-
Notifications
You must be signed in to change notification settings - Fork 19
Add CMake build and client support #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hello! Thank you very much for your contribution! I'll try it out tomorrow. As for your questions, both names are fine right now. |
|
The command line I built the project with as a developer on Windows in a Redirecting the build output into a file is recommended, because the output from the warnings is plentiful. Produces a 10 MB output on my machine. Don't mind the long configure command, it can be moved into a preset at any time. Producing a CMake package is also simple: So is running tests: Although the above will hang as noted in the test comments. |
|
Just a curiosity, I also tried to build with a couple other compilers on Windows as well:
|
|
Hello! Once again, thank you very much for your contribution!
I will take a look at the build errors you have encountered with other compilers on Windows. |
Since this is a header-only library (for now), it should be documented that the user should find and link OpenSSL if they need the features. Putting this behind a flag for a header-only library is absolutely pointless and just makes project code more complex for no benefit.
That explains why they are giving problems. I think they ought to be buildable, otherwise you will not know if they are actually correct. |
The fact that OpenSSL is optional is documented in multiple places. However, I suppose it wouldn't hurt to note that in the CMakeLists.txt as well. Right now, a comment would be good enough.
Of course! All the files are buildable except |
example/CMakeLists.txt
Outdated
| add_example("${f}" "${f}.cpp") | ||
| endforeach() | ||
|
|
||
| #[[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left this part in case you want to make this code compile. I can delete it if you want.
Boost is only tested on Microsoft Visual C++ compilers on Windows. Source: https://www.boost.org/users/history/version_1_82_0.html (Section Compilers Tested at the bottom of the page) |
|
Hello, I tried to build this with vcpkg toolchain and tests fail to build because |
|
vcpkg defaults to building dynamic libraries on Windows and static libraries on Linux and it seems Boost.Test is one of the libraries where dynamic linking makes changes to the API. I found a solution that works for both shared and static builds on MSVC and GCC 13.2 on Linux (although this one can't build the coroutine tests without ICE). |
What I need feedback on:
async-mqtt5, i.e. the package can be found withfind_package(async-mqtt5 REQUIRED)Async::MQTT5.I would've added GitHub Actions CI as well, but it seems the project has issues running its tests on Windows.
Note that the project requires some additional defines on Windows to be set by the person configuring from the command line via
-DCMAKE_CXX_FLAGS=...and that is good and must not be hardcoded into project code, because long term that is a fool's errand.