On 03/05/2011 02:25 PM, burlen wrote: > OK but why would LINK_SEARCH_END_STATIC result in "-Wl,-Bstatic > -Wl,-Bdynamic" being used ? Shouldn't it be just "-Bstatic" ?
You can read the logic in cmComputeLinkInformation.cxx to figure this out. > Why is CMake's default to make a substitution like "-lfoo" with > "-Bdynamic -lfoo"? The default assumption is dynamic linking but if one specifies a full path to a static library like /usr/lib/libm.a then it switches to -Bstatic to pick that up with "-lm" and then back to -Bdynamic. Static linking was not a goal at the time that stuff was written. > Thank you Brad! I tried the new feature and I still have a -Bdynamic > appearing in the middle of the link line I think the only way that can happen now is if you actually pass a ".so" file to target_link_libraries (assuming LINK_SEARCH_START_STATIC is on) that is in /usr/lib or another system directory. Check your CMakeCache for such entries. Really want to control things then bring all external libraries in as IMPORTED targets and set the IMPORTED_LOCATION property to point at the full path to the exact file you want. -Brad _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview