On Wed, 13 Jan 2010 07:04:46 -0600, Ryan Pavlik <rpav...@iastate.edu> wrote:
> 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.

The trouble is that the list of libraries is order-dependent so sorting
them will definitely not work.  Furthermore, list (REMOVE_DUPLICATES
lst) keeps the first copy and drops subsequent ones which means that
some libs will be neglected.  If there are no dependency loops, you can
reverse the list, REMOVE_DUPLICATES, and reverse it again (so that only
the last occurrence of the library shows up).  If there are loops, the
library will need to be explicitly linked more than once, but CMake does
not retain sufficient information to determine when this is safe,
therefore it cannot be provided as a general function (so you can only
"clean" the list when you know that the underlying dependency graph is
acyclic).

Jed
_______________________________________________
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