summaryrefslogtreecommitdiff
path: root/Help/variable/CMAKE_ENABLE_EXPORTS.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Help/variable/CMAKE_ENABLE_EXPORTS.rst')
-rw-r--r--Help/variable/CMAKE_ENABLE_EXPORTS.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_ENABLE_EXPORTS.rst b/Help/variable/CMAKE_ENABLE_EXPORTS.rst
new file mode 100644
index 000000000..9a877e7e6
--- /dev/null
+++ b/Help/variable/CMAKE_ENABLE_EXPORTS.rst
@@ -0,0 +1,22 @@
+CMAKE_ENABLE_EXPORTS
+--------------------
+
+Specify whether an executable exports symbols for loadable modules.
+
+Normally an executable does not export any symbols because it is the
+final program. It is possible for an executable to export symbols to
+be used by loadable modules. When this property is set to true CMake
+will allow other targets to ``link`` to the executable with the
+:command:`TARGET_LINK_LIBRARIES` command. On all platforms a target-level
+dependency on the executable is created for targets that link to it.
+For DLL platforms an import library will be created for the exported
+symbols and then used for linking. All Windows-based systems
+including Cygwin are DLL platforms. For non-DLL platforms that
+require all symbols to be resolved at link time, such as OS X, the
+module will ``link`` to the executable using a flag like
+``-bundle_loader``. For other non-DLL platforms the link rule is simply
+ignored since the dynamic loader will automatically bind symbols when
+the module is loaded.
+
+This variable is used to initialize the target property
+:prop_tgt:`ENABLE_EXPORTS` for executable targets.