-
Notifications
You must be signed in to change notification settings - Fork 96
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
CMake configure fails when using boost asio via find #201
Comments
Hi, @rcane ! Thanks for reporting! We'll take a look at them a bit later. |
I've added a new Dockerfile to check the presence of the first problem on Linux. Unfornunately, this file doesn't show an error with CMake configure. I'll try to find another way to show that such a problem exists and that it will be fixed properly. |
Her is some more information that maybe helps: I encountered the problems when I tried to install restinio via vcpkg. This SO article got me to the fix of the first bug. This is the modified configure call I use in the portfile:
So it is basically what your are doing in the dockerfile. I have no idea why it does not show the error. Maybe vcpkg does something that makes this different. |
I'm trying to check that behaviour on Windows with Boost. Maybe it will show the problem. |
@eao197 Regarding windows and vcpkg I can take a look tomorrow, and since github runners by default have vcpkg in it we can think of adding a CI (win+vcpk) to avoid such issues future. |
I had used Dockerfiles before you've configured GitHub CI for v0.7, but the Dockerfile used I hope I can check Boost on Window today (without vcpkg). |
It seems that this issue is related to vcpkg. I've tried Boost (1.83.0) on Windows and there are no problems. I'll try to make a project that uses vcpkg's overlay for RESTinio. |
I've repeated this problem with help of https://github.com/Stiffstream/restinio-crud-example/tree/restinio-0.7.0-vcpkg-overlay-boost-asio There is a fix for the problem in the 0.7-dev-issue-201 branch (at the commit 1f0234d). I think this fix will be a part of upcoming 0.7.1 release, but I'm afraid this may not happen on this week. |
Great. |
There are two bugs in the cmake scripts when using boost asio (
RESTINIO_ASIO_SOURCE=boost
andRESTINIO_DEP_BOOST_ASIO=find
).The first one is this line in the CMakeLists.txt file.
The
COMPONENTS
part offind_package
is only supposed to refer to libraries that are being linked. Since 'headers' is a header-only library it cannot be linked. Having it in theCOMPONENTS
list will make the cmake configuration fail since there is no target for the 'headers' library.To fix this just remove the 'headers' reference. The include directory for those header files will already be configured with the
find_package(Boost REQUIRED)
line.The second bug is in dev/restinio/cmake/restinio-config.cmake.in where "boost" is misspelled. It should say "Boost" instead.
The text was updated successfully, but these errors were encountered: