summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-08 14:54:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-03-08 14:55:09 (GMT)
commitf0b412dd82b8d45f1544961ecec618ebf877812d (patch)
treefe0fbaabbb68647cc1dd357d4da70f80fe0276e0 /Tests
parent4f99809b719f05461e6f9719d2874d5d96890ca2 (diff)
parent7723e9a058c579e3535df9bbe62ea218200e4250 (diff)
downloadCMake-f0b412dd82b8d45f1544961ecec618ebf877812d.zip
CMake-f0b412dd82b8d45f1544961ecec618ebf877812d.tar.gz
CMake-f0b412dd82b8d45f1544961ecec618ebf877812d.tar.bz2
Merge topic 'avoid-LIB_DEPENDS'
7723e9a058 Do not produce legacy _LIB_DEPENDS cache entries 2124a1364a cmTarget: Remove unnecessary RecordDependencies member 1c5bfab532 cmTarget: Simplify ClearDependencyInformation implementation 910a9d608e cmTarget: Simplify ClearDependencyInformation signature Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com> Merge-request: !1828
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt1
-rw-r--r--Tests/RunCMake/add_library/CMP0073-stdout.txt3
-rw-r--r--Tests/RunCMake/add_library/CMP0073.cmake18
-rw-r--r--Tests/RunCMake/add_library/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/add_library/empty.c0
5 files changed, 24 insertions, 0 deletions
diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
index 8d5139d..5af6fcd 100644
--- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
+++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
@@ -23,6 +23,7 @@
\* CMP0065
\* CMP0068
\* CMP0069
+ \* CMP0073
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/add_library/CMP0073-stdout.txt b/Tests/RunCMake/add_library/CMP0073-stdout.txt
new file mode 100644
index 0000000..84645b8
--- /dev/null
+++ b/Tests/RunCMake/add_library/CMP0073-stdout.txt
@@ -0,0 +1,3 @@
+-- warn_LIB_DEPENDS='general;bar;'
+-- old_LIB_DEPENDS='general;bar;'
+-- new_LIB_DEPENDS=''
diff --git a/Tests/RunCMake/add_library/CMP0073.cmake b/Tests/RunCMake/add_library/CMP0073.cmake
new file mode 100644
index 0000000..b34f5dc
--- /dev/null
+++ b/Tests/RunCMake/add_library/CMP0073.cmake
@@ -0,0 +1,18 @@
+enable_language(C)
+
+add_library(warn empty.c)
+target_link_libraries(warn bar)
+message(STATUS "warn_LIB_DEPENDS='${warn_LIB_DEPENDS}'")
+
+cmake_policy(SET CMP0073 OLD)
+add_library(old empty.c)
+target_link_libraries(old bar)
+message(STATUS "old_LIB_DEPENDS='${old_LIB_DEPENDS}'")
+
+cmake_policy(SET CMP0073 NEW)
+add_library(new empty.c)
+target_link_libraries(new bar)
+message(STATUS "new_LIB_DEPENDS='${new_LIB_DEPENDS}'")
+if(DEFINED new_LIB_DEPENDS)
+ message(FATAL_ERROR "new_LIB_DEPENDS set but should not be")
+endif()
diff --git a/Tests/RunCMake/add_library/RunCMakeTest.cmake b/Tests/RunCMake/add_library/RunCMakeTest.cmake
index 0ba6216..dfadb8f 100644
--- a/Tests/RunCMake/add_library/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_library/RunCMakeTest.cmake
@@ -1,5 +1,7 @@
include(RunCMake)
+run_cmake(CMP0073)
+
run_cmake(INTERFACEwithNoSources)
run_cmake(OBJECTwithNoSources)
run_cmake(STATICwithNoSources)
diff --git a/Tests/RunCMake/add_library/empty.c b/Tests/RunCMake/add_library/empty.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/add_library/empty.c