Open paskino opened 2 years ago
I'm not sure but think this is a common problem with CMake and boost. I think it happens when both static and dynamic boost libraries are present. We had a similar problem for ISMRMRD https://github.com/SyneRBI/SIRF-SuperBuild/issues/403 with https://github.com/ismrmrd/ismrmrd/pull/134 (merged) giving more info in the comments.
It probably means we should add target_compile_definitions(BOOST_ALL_DYN_LINK=1)
if WIN32
(see boost doc for info on that variable).
Other pointers https://github.com/SyneRBI/SIRF-SuperBuild/blob/c19d1340dfc623518c3594538cc4a7121a14b670/SuperBuild/External_Boost.cmake#L105-L111
Re-reading some of this, I'm not sure if I understood it all correctly (I certainly don't understand it now!). Adding this flag would likely prevent linking with static boost libraries, but this is probably not very common. I feel CMake should sort this out, but it doesn't seem to.
Also informative seems https://stackoverflow.com/a/4763452/3467846 with recommendations on how to diagnose.
I build SIRF on windows using HDF5, FFTW3 and Boost from conda. I have problems linking with Boost (I also set
-DRUN_ISMRMRD_SHEPP_LOGAN:BOOL=OFF
)Any idea?
This is what I've done: