15 Sep
2020
15 Sep
'20
5:28 p.m.
Andrey Semashev wrote:
I'm not sure, but I think the above would generate incorrect order of libraries in the linker command line. You need to ensure that boost_log comes after boost_log_setup, and their dependencies come after still.
CMake automatically orders libraries so that the dependencies come after. Unfortunately, FindBoost has a bug and declares log as depending on log_setup, rather than vice versa. https://github.com/Kitware/CMake/blob/bdcde7762c71cd27fcba6dc1a3efe12fa7a09f... No matter how you order the libraries in target_link_libraries, the order between these two will never be correct. Not sure if this is the problem here though.