[CMake] How to instruct CMAKE not to generate a .lib for the target .exe

llvm 999 llvm.999 at outlook.com
Wed Nov 7 12:39:28 EST 2018


I have a very simple CMAKE to generate a .exe target (say xyz.exe) with several .cpp source files and some external .lib files (boost and wxwidgets).


For some reason, CMAKE generates a .lib for the target (xyz.lib) and then generate the .exe (xyz.exe) using the /IMPLIB liner option to pull in the xyz.lib file.


Is there a way to instruct CMAKE not to generate the .lib (xyz.lib) but only to generate the .obj (xyz.obj) before performing the link operation?


Thanks in advance for your help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20181107/3e56c694/attachment.html>


More information about the CMake mailing list