[CMake] How to override CMAKE_C_IMPLICIT_LINK_LIBRARIES

陆秋文 luqiuwen at gmail.com
Tue Jan 26 00:35:01 EST 2016


I have the need to link a shared library to all the targets without
modifying the CMakeLists.txt(for example, tcmalloc.so). I used the command:

# cmake -DCMAKE_C_IMPLICIT_LINK_LIBRARIES:STRING=tcmalloc

However, It didn't work. I used the message() command to print the
CMAKE_C_IMPLICIT_LINK_LIBRARIES, It show:

-- CMAKE_C_IMPLICIT_LINK_LIBRARIES=c

Can someone point me why this happens? Thanks very much!

Qiuwen Lu
luqiuwen at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160126/fcb55631/attachment.html>


More information about the CMake mailing list