Help: Discourage use of Swift_MODULE_DIRECTORY with multi-config generators

It does not yet support per-config module directories.

Issue: #25989
Issue: #26010
This commit is contained in:
Dave Abrahams
2024-05-23 13:33:25 -04:00
committed by Brad King
parent 71c52c76fa
commit 61e76200d7

View File

@@ -10,3 +10,15 @@ the modules will be placed. When this property is not set, the modules will be
placed in the build directory corresponding to the target's source directory.
If the variable :variable:`CMAKE_Swift_MODULE_DIRECTORY` is set when a target is
created its value is used to initialize this property.
.. warning::
This property does not currently provide a way to express per-config
module directories, so use with multi-config generators is problematic:
* The :generator:`Xcode` generator does not implement the property at all.
* The :generator:`Ninja Multi-Config` generator implements this property,
but module files generated for different build configurations have the
same path, which can lead to subtle problems when building more than
one configuration.