CMP0208.rst 1.2 KB

123456789101112131415161718192021222324252627282930
  1. CMP0208
  2. -------
  3. .. versionadded:: 4.3
  4. :command:`export(EXPORT)` does not allow empty arguments.
  5. In CMake 4.2 and below, the :command:`export(EXPORT)` command silently
  6. accepted ``NAMESPACE``, ``FILE`` or ``CXX_MODULES_DIRECTORY`` arguments with
  7. empty or missing values.
  8. CMake 4.3 and above issue a diagnostic if any of these keywords are present
  9. without an associated value, or of the value given to ``FILE`` or
  10. ``CXX_MODULES_DIRECTORY`` is empty. (``NAMESPACE`` is allowed to have an empty
  11. value, but an empty value must be quoted.) A diagnostic is also issued
  12. immediately if the value of ``EXPORT`` is missing or empty. (Previously, this
  13. would result in an error at generate-time because no export set whose name is
  14. empty can exist.)
  15. This policy provides compatibility with projects which may have relied on the
  16. previous lack of enforcement. The ``OLD`` behavior for this policy permits
  17. these keywords to be present without an accompanying value, or to be given an
  18. empty value. The ``NEW`` behavior requires that a value be given, and that
  19. the value (except for ``NAMESPACE``) is non-empty.
  20. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 4.3
  21. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  22. .. include:: include/STANDARD_ADVICE.rst
  23. .. include:: include/DEPRECATED.rst