Re: [CMake] Ninja generator bug when handling Windows .dll without associated import .lib
On 07/21/2016 12:27 PM, Kamen Lilov wrote: > 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. That output needs to be listed or it will not be re-built when missing. The way to tell CMake to build a .dll with no .lib is to specify the add_library command's MODULE library type. This specifies that it is a loaded module and not something that is linked. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Ninja generator bug when handling Windows .dll without associated import .lib
Hello, Apologies if this is a duplicate, I searched the net 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. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Ninja generator bug when handling Windows .dll without associated import .lib
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. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake