[CMake] How to override CMAKE_C_IMPLICIT_LINK_LIBRARIES

2016-01-25 Thread 陆秋文
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

Re: [CMake] How to override CMAKE_C_IMPLICIT_LINK_LIBRARIES

2016-01-25 Thread Nils Gladitz
On 01/26/2016 06:35 AM, 陆秋文 wrote: 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