Swift_SEPARATE_MODULE_EMISSION — CMake 4.4.3-dirty Documentation

# Swift_SEPARATE_MODULE_EMISSION

Added in version 4.4.

Emit Swift modules separately from compilation in the Ninja Generators.

When this property is set to `ON` on an importable Swift target built by Ninja Generators, CMake emits a separate `-emit-module` build edge that produces the `.swiftmodule` independently of object compilation. This allows downstream Swift targets to begin compiling as soon as the module interface is available, rather than waiting for all upstream compilation outputs.

The property is initialized from the value of the `CMAKE_Swift_SEPARATE_MODULE_EMISSION` variable, if it is set. If this property is not set, separate module emission is enabled by default. See policy `CMP0215`.

Note

Separate module emission takes effect only when policy `CMP0157` is set to `NEW` prior to the first `project()` or `enable_language()` command that enables the Swift language.