1ENABLE_EXPORTS 2-------------- 3 4Specify whether an executable exports symbols for loadable modules. 5 6Normally an executable does not export any symbols because it is the 7final program. It is possible for an executable to export symbols to 8be used by loadable modules. When this property is set to true CMake 9will allow other targets to "link" to the executable with the 10:command:`target_link_libraries` command. On all platforms a target-level 11dependency on the executable is created for targets that link to it. 12Handling of the executable on the link lines of the loadable modules 13varies by platform: 14 15* On Windows-based systems (including Cygwin) an "import library" is 16 created along with the executable to list the exported symbols. 17 Loadable modules link to the import library to get the symbols. 18 19* On macOS, loadable modules link to the executable itself using the 20 ``-bundle_loader`` flag. 21 22* On AIX, a linker "import file" is created along with the executable 23 to list the exported symbols for import when linking other targets. 24 Loadable modules link to the import file to get the symbols. 25 26* On other platforms, loadable modules are simply linked without 27 referencing the executable since the dynamic loader will 28 automatically bind symbols when the module is loaded. 29 30This property is initialized by the value of the variable 31:variable:`CMAKE_ENABLE_EXPORTS` if it is set when a target is created. 32