On 1/13/10 6:51 AM, Nico Schlömer wrote:
Overlinking is actually only an issue for dynamic libraries. So as long as 
you're absolutely sure that you only have static libraries, you're fine.
Oh, I was thinking it is *unclean* to have a link line like

-llibrarya /usr/local/local/liblapack.a --llibraryb
/usr/local/local/liblapack.a     (1)

-- which (disappointingly?) is exactly what happens now that I have
FindLibraryA.cmake and FindLibraryB.cmake, both equipped with

   SET_TARGET_PROPERTIES(A PROPERTIES
                          IMPORTED_LOCATION "${A_LIBRARY}"
                          IMPORTED_LINK_INTERFACE_LIBRARIES
"${A_LINK_INTERFACE_LIBRARIES}"
                        )

where both ${A_LINK_INTERFACE_LIBRARIES} and
${B_LINK_INTERFACE_LIBRARIES} contain /usr/local/local/liblapack.a.


Does the IMPORTED_LINK_INTERFACE_LIBRARIES thing work?
So, yeap, it works, but I expected CMake to clean up after me
dependency-wise -- instead of (1), this

-llibrarya --llibraryb /usr/local/local/liblapack.a     (1')

would be sufficient. My knowledge on the linking process itself is
unfortunately not deep enough to tell if that makes an actual
difference.

Cheers,
Nico
You could use the CleanLibraryList module I posted a few emails ago: just make a list that contains all the libraries you are going to link your target against, and then just run clean_library_list on it before doing so.

Ryan

--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com/

_______________________________________________
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 CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to