summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-06-04 16:25:47 +0200
committerStephen Kelly <steveire@gmail.com>2013-07-08 22:39:09 +0200
commitd0a76ea07cfc2a73900a9539e940e1e60dbba120 (patch)
tree8afdc5cb57a2ee3c88db5a677a2e642b40415326 /Tests/RunCMake/CMP0022/RunCMakeTest.cmake
parentddde61c0b2b46a452366acae690aca0095c0a49c (diff)
downloadcmake-d0a76ea07cfc2a73900a9539e940e1e60dbba120.tar.gz
Introduce the INTERFACE_LINK_LIBRARIES property.
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.
Diffstat (limited to 'Tests/RunCMake/CMP0022/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CMP0022/RunCMakeTest.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
new file mode 100644
index 0000000000..2e74f17de3
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
@@ -0,0 +1,5 @@
+include(RunCMake)
+
+run_cmake(CMP0022-WARN)
+run_cmake(CMP0022-WARN-static)
+run_cmake(CMP0022-NOWARN-static)