[CMake] Ninja generator bug when handling Windows .dll without associated import .lib

Kamen Lilov kamen.lilov at chaosgroup.com
Thu Jul 21 12:27:05 EDT 2016


Hello,

Apologies if this is a duplicate, I searched the net to the best of my ability but was unable to find references to this bug.

When a Windows .DLL is generated, the Microsoft linker may sometimes decide that no import library needs to be built. This happens often in one of our projects, we have many .dll's that tie themselves into our infrastructure during static class initialization and export no functions (although they do work and get called via class method pointers from elsewhere)

The Ninja CMake generator seems to always emit a dependency on an associated import library along with the .dll file. This causes Ninja to think that a just-built .dll is out of sync (as it can't find the import library file) and relink it, even though it is not dirty.

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


More information about the CMake mailing list