diff options
author | Raul Tambre <raul@tambre.ee> | 2020-08-08 10:17:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-08-21 12:38:39 (GMT) |
commit | 359c500a2466ffc2507b81c0089bce18fd5debbb (patch) | |
tree | e8eba9aa91e55b068a9b92989813a3db131befd5 /Help/policy | |
parent | 692bc2de9475d14a2f40b94d88ea91db2df5311c (diff) | |
download | CMake-359c500a2466ffc2507b81c0089bce18fd5debbb.zip CMake-359c500a2466ffc2507b81c0089bce18fd5debbb.tar.gz CMake-359c500a2466ffc2507b81c0089bce18fd5debbb.tar.bz2 |
cmTarget: Raise error if imported target location is not set
Previously we would synthesize <TARGET_NAME>-NOTFOUND as the location. This
would then end up on the link line and cause build failures.
Policy CMP0110 is added to control this behaviour.
Fixes #19080, #19943.
Diffstat (limited to 'Help/policy')
-rw-r--r-- | Help/policy/CMP0111.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Help/policy/CMP0111.rst b/Help/policy/CMP0111.rst new file mode 100644 index 0000000..37e5ad5 --- /dev/null +++ b/Help/policy/CMP0111.rst @@ -0,0 +1,20 @@ +CMP0111 +------- + +.. versionadded:: 3.19 + +An imported target with a missing location fails during generation. + +Prior to this the location would be generated as ``<TARGET_NAME>-NOTFOUND``, +which would result in build failures. + +The ``OLD`` behavior of this policy is to generate the location of an imported +unknown, static or shared library target as ``<TARGET_NAME>-NOTFOUND`` if not +set. +The ``NEW`` behavior is to raise an error. + +This policy was introduced in CMake version 3.19. CMake version |release| +warns when the policy is not set and uses ``OLD`` behavior. Use the +:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. + +.. include:: DEPRECATED.txt |