CMake/Help/policy/CMP0004.rst
Nikita Nemkin 9890cfc4ec Help: More syntax highlighting for literal blocks
Covers almost all blocks containing actual code, except:

* Parsed-literal blocks can't be highlighted, including many command
  summaries and substitution-heavy docs like find_... commands.
  This is a Sphinx limitation.

* Code with errors, like CMP0049, DEPLOYMENT_ADDITIONAL_FILES,
  DEPLOYMENT_REMOTE_DIRECTORY, @PACKAGE_INIT@ substitution in the
  tutorial, bracket arguments/comments in cmake-language.7 and
  cmake-developer.7.

* FindQt4 module, which needs reformatting.
2025-01-29 16:48:53 -05:00

28 lines
886 B
ReStructuredText

CMP0004
-------
.. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
.. include:: REMOVED_PROLOGUE.txt
Libraries linked may not have leading or trailing whitespace.
CMake versions 2.4 and below silently removed leading and trailing
whitespace from libraries linked with code like
.. code-block:: cmake
target_link_libraries(myexe " A ")
This could lead to subtle errors in user projects.
The ``OLD`` behavior for this policy is to silently remove leading and
trailing whitespace. The ``NEW`` behavior for this policy is to diagnose
the existence of such whitespace as an error. The setting for this
policy used when checking the library names is that in effect when the
target is created by an :command:`add_executable` or :command:`add_library`
command.
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNED_OR_DID_NOT_WARN| replace:: warned
.. include:: REMOVED_EPILOGUE.txt