summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/CMP0022/CMP0022-NOWARN-static.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Genex: Add a test for the LINK_ONLY expression.Stephen Kelly2013-11-061-5/+1
| | | | | | | | | | | | | | Commit 239b0c6b (Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES., 2013-10-20) extended a test which excercised the logic of the LINK_ONLY generator expression. Commit ef10b87c (CMP0022: Plain target_link_libraries must populate link interface, 2013-11-02) removed the instance of LINK_ONLY which was excercised by that test. Add a new test which excercises the other instance of LINK_ONLY by setting the CMP0022 policy to NEW and consuming the contents of the INTERFACE_LINK_LIBRARIES target property.
* Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.Stephen Kelly2013-10-261-1/+5
| | | | | | | | | | | | | Only valid target names or generator expressions may appear in the target field of a LINK_ONLY expression. Other content like link flags should still be added to that property (wrapped in config-specific generator expressions), but not wrapped in LINK_ONLY. Otherwise undue warnings would be issued for the policy CMP0022. The LINK_ONLY expression only has an effect for actual target names anyway, so there is no logical deficit.
* Introduce the INTERFACE_LINK_LIBRARIES property.Stephen Kelly2013-07-081-0/+8
This property replaces the properties which match (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?, and is enabled for IMPORTED targets, and for non-IMPORTED targets only with a policy. For static libraries, the INTERFACE_LINK_LIBRARIES property is also used as the source of transitive usage requirements content. Static libraries still require users to link to all entries in their LINK_LIBRARIES, but usage requirements such as INCLUDE_DIRECTORIES COMPILE_DEFINITIONS and COMPILE_OPTIONS can be restricted to only certain interface libraries. Because the INTERFACE_LINK_LIBRARIES property is populated unconditionally, we need to compare the evaluated result of it with the link implementation to determine whether to issue the policy warning for static libraries. For shared libraries, the policy warning is issued if the contents of the INTERFACE_LINK_LIBRARIES property differs from the contents of the relevant config-specific old LINK_INTERFACE_LIBRARIES property.