cmake/Help/prop_tgt/ENABLE_EXPORTS.rst

23 lines
1.1 KiB
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
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
2015-11-17 17:22:37 +01:00
:command:`TARGET_LINK_LIBRARIES` command. On all platforms a target-level
2014-08-03 19:52:23 +02:00
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
2016-03-13 13:35:51 +01:00
require all symbols to be resolved at link time, such as OS X, the
2014-08-03 19:52:23 +02:00
module will "link" to the executable using a flag like
2016-03-13 13:35:51 +01:00
``-bundle_loader``. For other non-DLL platforms the link rule is simply
2014-08-03 19:52:23 +02:00
ignored since the dynamic loader will automatically bind symbols when
the module is loaded.
2015-11-17 17:22:37 +01:00
This property is initialized by the value of the variable
:variable:`CMAKE_ENABLE_EXPORTS` if it is set when a target is created.