-
Notifications
You must be signed in to change notification settings - Fork 112
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] fix for Boost 1.70 #65
Conversation
It would be nice to upgrade CMake version to 3.7 because that gives the GREATER_EQUAL macro, which makes it easier to read conditional statements. |
src/application/CMakeLists.txt
Outdated
@@ -15,6 +15,10 @@ endif() | |||
find_package(Boost 1.53.0 REQUIRED COMPONENTS program_options system filesystem) |
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.
@simogasp Do we need find_package(Boost ...) twice for this fix to work?
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.
yes because the applications can be an independent cmake project (you can use popsift installed somewhere else to build, so you can test the use as 3rd pary) and requires a different set of components from boost.
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.
oh no, sorry i didn't see that, i thought you were referring to the one in the main cmakefile. Obviously this is unnecessary, i'll fix it
If it were to me, at this point I'd move all projects to 3.15 or 3.16, like that for at least a year we won't have to deal with many different versions of cmake. It's a bit rude but it would simplify a lot everything. Cmake comes with pre-built binaries for every platform, so it is not a big deal to download the latest version. |
Not sure if we really need 3.15 as minimal. |
I'm also happy with a push to 3.15. |
Boost 1.70 uses only the modern CMake way of
find_package()
and it imports both the targets and set theBoost_LIBRARIES
variable with the found components targets (as opposed to the path to the libs).This leads to a linking error for the examples as the variables are not set again with the proper targets (maybe a bug on boost side).
Here the variables are first voided before the
find_package()
and this seems to restore the correct behavior.In the future, it would be better to completely switch to the modern CMake way (which requires to raise the CMake version at least to 3.5)