cmake/Help/policy/CMP0004.rst

27 lines
815 B
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
CMP0004
-------
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
::
target_link_libraries(myexe " A ")
This could lead to subtle errors in user projects.
2019-11-11 23:01:05 +01:00
The ``OLD`` behavior for this policy is to silently remove leading and
trailing whitespace. The ``NEW`` behavior for this policy is to diagnose
2014-08-03 19:52:23 +02:00
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
2019-11-11 23:01:05 +01:00
target is created by an :command:`add_executable` or :command:`add_library`
command.
2014-08-03 19:52:23 +02:00
2024-04-14 22:45:38 +02:00
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.0
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: STANDARD_ADVICE.txt
2015-08-17 11:37:30 +02:00
.. include:: DEPRECATED.txt