summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2015-06-19 20:12:43 (GMT)
committerBrad King <brad.king@kitware.com>2015-07-06 15:11:02 (GMT)
commit8f86407cfd4331dc1f2eb67f4f179ed8fe9dea06 (patch)
tree8d6670fe80a98055f6302241bb7177ea7d22b77d /Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst
parent069aa93b555293679f4b8c07623133ba62a74ee4 (diff)
downloadCMake-8f86407cfd4331dc1f2eb67f4f179ed8fe9dea06.zip
CMake-8f86407cfd4331dc1f2eb67f4f179ed8fe9dea06.tar.gz
CMake-8f86407cfd4331dc1f2eb67f4f179ed8fe9dea06.tar.bz2
Windows: Optionally generate DLL module definition files automatically
Create target property WINDOWS_EXPORT_ALL_SYMBOLS to automatically generate a module definition file from MS-compatible .obj files and give it to the linker in order to export all symbols from the .dll part of a SHARED library.
Diffstat (limited to 'Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst')
-rw-r--r--Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst b/Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst
new file mode 100644
index 0000000..3f48af8
--- /dev/null
+++ b/Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst
@@ -0,0 +1,18 @@
+WINDOWS_EXPORT_ALL_SYMBOLS
+--------------------------
+
+This property is implemented only for MS-compatible tools on Windows.
+
+Enable this boolean property to automatically create a module definition
+(``.def``) file with all global symbols found in the input ``.obj`` files
+for a ``SHARED`` library on Windows. The module definition file will be
+passed to the linker causing all symbols to be exported from the ``.dll``.
+For global *data* symbols, ``__declspec(dllimport)`` must still be used when
+compiling against the code in the ``.dll``. All other function symbols will
+be automatically exported and imported by callers. This simplifies porting
+projects to Windows by reducing the need for explicit ``dllexport`` markup,
+even in ``C++`` classes.
+
+This property is initialized by the value of
+the :variable:`CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS` variable if it is set
+when a target is created.