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
-- 

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

Reply via email to