[cmake-developers] Order of linking libraries
Marcin Maslany
marcinmaslany at gmail.com
Wed Jan 22 05:31:09 EST 2014
Hello,
what's the order of linking libraries? Is it always deterministic? I know
it is possible to build dependency graph on libraries with cmake and find
the correct order with topological sorting (this might be the way you do
it).
However, when I check the output from two builds (one after another) using
cmake I can see that order is not always the same. I mean when I compare
phrases "Linking C/CXX static library ..". Even if I run make with only one
job.
I totally agree that it still produces the correct binary, but I'd like to
know if it's possible to ensure that the linking order of libraries is (no
matter what machine I am running it on) deterministic? Of course, other
than adding fake dependencies.
I am just courius what is the reason of different order, even if I use the
same machine to build binary.
BR, Marcin Maslany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140122/d6f15e8c/attachment.html>
More information about the cmake-developers
mailing list