[CMake] OBJECT target - usage of translation units in libraries and executables

Andreas Pokorny andreas.pokorny at gmail.com
Fri Jan 4 06:06:10 EST 2013


Hi,
I just stumbled across the OBJECT flag in add_library. Now I wonder
whether it also works for windows builds with dlexport and dlimport
flags attached to symbols. Based on the documentation it seems like
object files are built immediately. Is it possible that an object
library is used in a dynamic library with its symbols get exported,
and in a different target the symbols are hidden. From what I
understood the source code of the object library has to be built
twice, and the caller of the symbols has to be aware whether the
exported symbol references or "normal" symbols shall be used.

regards
Andreas


More information about the CMake mailing list