[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. |
| @@ -15,6 +15,10 @@ endif() | |||
| find_package(Boost 1.53.0 REQUIRED COMPONENTS program_options system filesystem) | |||
There was a problem hiding this comment.
@simogasp Do we need find_package(Boost ...) twice for this fix to work?
There was a problem hiding this comment.
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.
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_LIBRARIESvariable 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)