[CMake] A bug that seems solved, but not listed in mantis log

Jakob van Bethlehem jsvanbethlehem at gmail.com
Thu May 19 06:57:50 EDT 2016


Dear users,

With cmake 3.2.2 doing the following with VS 2013:
add_library(ObjectLib OBJECT source1.cpp source2.cpp)
add_library(MyDll SHARED $<TARGET_OBJECTS:ObjectLib)

there seems to be a problem that there is no explicit dependency added
between the shared library and the object files. In other words: I noticed
VS trying to link the dll, and then complaining that the object files
didn't exist, which was indeed true.

The workaround is to:
add_dependency(MyDll ObjectLib)

With cmake 3.5.2 I noticed this problem is gone, and the workaround could
be removed. Apparently the bug was noted and solved. However, I can't find
a reference to such a bug on https://cmake.org/Bug/changelog_page.php.

Does anyone know whether this bug was solved as part of some other bug or
feature and if yes, which one?

Sincerely,
Jakob van Bethlehem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160519/4a9f6236/attachment.html>


More information about the CMake mailing list