WINDOWS_EXPORT_ALL_SYMBOLS.rst 895 B

123456789101112131415161718
  1. WINDOWS_EXPORT_ALL_SYMBOLS
  2. --------------------------
  3. This property is implemented only for MS-compatible tools on Windows.
  4. Enable this boolean property to automatically create a module definition
  5. (``.def``) file with all global symbols found in the input ``.obj`` files
  6. for a ``SHARED`` library on Windows. The module definition file will be
  7. passed to the linker causing all symbols to be exported from the ``.dll``.
  8. For global *data* symbols, ``__declspec(dllimport)`` must still be used when
  9. compiling against the code in the ``.dll``. All other function symbols will
  10. be automatically exported and imported by callers. This simplifies porting
  11. projects to Windows by reducing the need for explicit ``dllexport`` markup,
  12. even in ``C++`` classes.
  13. This property is initialized by the value of
  14. the :variable:`CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS` variable if it is set
  15. when a target is created.