[CMake] Help: erroneous '-ltbb' getting injected into link command implicitly

Chris Green greenc at fnal.gov
Thu Oct 12 19:21:17 EDT 2017


Hi,

Using CMake 3.9.2, I'm trying to ascertain where an instance of '-ltbb' 
is getting injected into the link command line of some of our 
executables. This is bad because we can't find it anywhere in our source 
(we have a config CMake that uses the full path to the library), and the 
system TBB library is being picked up which is wrong (old version 
compiled with wrong compiler to wrong C++ standard). I have verified 
that we have no explicit use of '-ltbb' anywhere, and also that 
LIBRARY_PATH is not being set in the environment. Two questions arise:

 1. How can I trace what is going into the link.txt files, and whence?
 2. Are there any remaining mechanisms for explicit conversion from
    X/Y/Z/libQ.so to -lQ that I'm unaware of?

It should be noted as a matter of form that the link.txt contains a 
*whole* lot of stuff that wasn't explicitly put there by the 
target_link_libraries() command, and that turns out to be superfluous.

Any help in this matter would be gratefully received, because too much 
of this is currently a black box to me and I'm lost.

Thanks,

Chris.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20171012/b9714dc8/attachment.html>


More information about the CMake mailing list