mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Propagates variables set in enable_language() logic up variable scopes so that the language can be used by targets in the ancestor directories. Works through block() and function() scopes as well. The add_subdirectory() call can be thought of as the effective call site for enabling the language. The same holds for endblock() and the actual function call. Adds a policy CMP0220 to control this behavior. As the language is "enabled" at each ancestor scope, the policy is checked. If OLD, the language is not enabled at this scope and the ones above. Closes: #27881 #27508 #27389 Related: #26751 #27564
10 lines
458 B
ReStructuredText
10 lines
458 B
ReStructuredText
enable_language-subdirectory
|
|
----------------------------
|
|
|
|
* The :command:`enable_language` command, and the :command:`project` command
|
|
that calls it, may now be used in a subdirectory to enable a language for
|
|
targets in ancestor directory scopes. The language configuration is
|
|
propagated up to enclosing scopes. This also lifts the restriction for
|
|
calling inside of :command:`block` and :command:`function` commands. See
|
|
policy :policy:`CMP0220`.
|