diff options
author | Kitware Robot <kwrobot@kitware.com> | 2013-10-15 15:17:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-15 18:12:03 (GMT) |
commit | f051814ed0e63badbfd68049354f36259dbf4b49 (patch) | |
tree | f4e6f885f86c882d723a7dd53d2b702d0c7fdffb /Help/policy/CMP0023.rst | |
parent | e94958e99c4dec26c86ce8b76d744c04ba960675 (diff) | |
download | CMake-f051814ed0e63badbfd68049354f36259dbf4b49.zip CMake-f051814ed0e63badbfd68049354f36259dbf4b49.tar.gz CMake-f051814ed0e63badbfd68049354f36259dbf4b49.tar.bz2 |
Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:
./convert-help.bash "/path/to/CMake-build/bin"
Then remove it.
Diffstat (limited to 'Help/policy/CMP0023.rst')
-rw-r--r-- | Help/policy/CMP0023.rst | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Help/policy/CMP0023.rst b/Help/policy/CMP0023.rst new file mode 100644 index 0000000..962b624 --- /dev/null +++ b/Help/policy/CMP0023.rst @@ -0,0 +1,33 @@ +CMP0023 +------- + +Plain and keyword target_link_libraries signatures cannot be mixed. + +CMake 2.8.12 introduced the target_link_libraries signature using the +PUBLIC, PRIVATE, and INTERFACE keywords to generalize the LINK_PUBLIC +and LINK_PRIVATE keywords introduced in CMake 2.8.7. Use of +signatures with any of these keywords sets the link interface of a +target explicitly, even if empty. This produces confusing behavior +when used in combination with the historical behavior of the plain +target_link_libraries signature. For example, consider the code: + +:: + + target_link_libraries(mylib A) + target_link_libraries(mylib PRIVATE B) + +After the first line the link interface has not been set explicitly so +CMake would use the link implementation, A, as the link interface. +However, the second line sets the link interface to empty. In order +to avoid this subtle behavior CMake now prefers to disallow mixing the +plain and keyword signatures of target_link_libraries for a single +target. + +The OLD behavior for this policy is to allow keyword and plain +target_link_libraries signatures to be mixed. The NEW behavior for +this policy is to not to allow mixing of the keyword and plain +signatures. + +This policy was introduced in CMake version 2.8.12. CMake version +|release| warns when the policy is not set and uses OLD behavior. Use +the cmake_policy command to set it to OLD or NEW explicitly. |