summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-24 13:43:10 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-11-24 13:43:22 (GMT)
commit1f1d70515402eabaf06c842a7cf9a87fbb2ff58f (patch)
tree42d6c752a01c8bea46e8756e5bc171cfe6dd9736 /Tests
parentaeb0e401110d8aa9ce2248b01611f7e7e01e21be (diff)
parent54ef732b0c409b3ed9376bf6cdb40d1038209ecb (diff)
downloadCMake-1f1d70515402eabaf06c842a7cf9a87fbb2ff58f.zip
CMake-1f1d70515402eabaf06c842a7cf9a87fbb2ff58f.tar.gz
CMake-1f1d70515402eabaf06c842a7cf9a87fbb2ff58f.tar.bz2
Merge topic 'policy-cmp0111-iface' into release-3.19
54ef732b0c cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE library f06f4b517c cmTarget: Do not enforce CMP0111 on imported INTERFACE libraries 43c95df8fb Tests: Match RunCMake.CMP0111 stderr more strictly Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5530
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-Common.cmake5
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt14
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt20
-rw-r--r--Tests/RunCMake/CMP0111/main.cpp3
-rw-r--r--Tests/RunCMake/CMP0111/module.cpp4
5 files changed, 34 insertions, 12 deletions
diff --git a/Tests/RunCMake/CMP0111/CMP0111-Common.cmake b/Tests/RunCMake/CMP0111/CMP0111-Common.cmake
index 564169d..c31e4ba 100644
--- a/Tests/RunCMake/CMP0111/CMP0111-Common.cmake
+++ b/Tests/RunCMake/CMP0111/CMP0111-Common.cmake
@@ -4,6 +4,7 @@ set(CMAKE_IMPORT_LIBRARY_SUFFIX "placeholder")
add_library(unknown_lib UNKNOWN IMPORTED)
add_library(static_lib STATIC IMPORTED)
add_library(shared_lib SHARED IMPORTED)
+add_library(interface_lib INTERFACE IMPORTED)
-add_executable(executable main.cpp)
-target_link_libraries(executable unknown_lib static_lib shared_lib)
+add_library(module MODULE module.cpp)
+target_link_libraries(module unknown_lib static_lib shared_lib interface_lib)
diff --git a/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt
index ba5d936..91a90e5 100644
--- a/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt
+++ b/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt
@@ -1,7 +1,17 @@
+^CMake Error in CMakeLists.txt:
+ IMPORTED_LOCATION not set for imported target "unknown_lib"( configuration
+ "[^"]+")?.
++
CMake Error in CMakeLists.txt:
IMPORTED_LOCATION not set for imported target "static_lib"( configuration
- ".+")?.
+ "[^"]+")?.
+
CMake Error in CMakeLists.txt:
IMPORTED_IMPLIB not set for imported target "shared_lib"( configuration
- ".+")?.
+ "[^"]+")?.(
++
+CMake Error in CMakeLists.txt:
+ IMPORTED_(LOCATION|IMPLIB) not set for imported target "(unknown|static|shared)_lib"( configuration
+ "[^"]+")?.)*
++
+CMake Generate step failed. Build files cannot be regenerated correctly.$
diff --git a/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
index 3abca0a..27af911 100644
--- a/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
@@ -1,11 +1,11 @@
-CMake Warning \(dev\) in CMakeLists.txt:
+^CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0111 is not set: An imported target missing its location property
fails during generation. Run "cmake --help-policy CMP0111" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
IMPORTED_LOCATION not set for imported target "unknown_lib"( configuration
- ".+")?.
+ "[^"]+")?.
This warning is for project developers. Use -Wno-dev to suppress it.
+
CMake Warning \(dev\) in CMakeLists.txt:
@@ -15,7 +15,7 @@ CMake Warning \(dev\) in CMakeLists.txt:
warning.
IMPORTED_LOCATION not set for imported target "static_lib"( configuration
- ".+")?.
+ "[^"]+")?.
This warning is for project developers. Use -Wno-dev to suppress it.
+
CMake Warning \(dev\) in CMakeLists.txt:
@@ -25,5 +25,15 @@ CMake Warning \(dev\) in CMakeLists.txt:
warning.
IMPORTED_IMPLIB not set for imported target "shared_lib"( configuration
- ".+")?.
-This warning is for project developers. Use -Wno-dev to suppress it.
+ "[^"]+")?.
+This warning is for project developers. Use -Wno-dev to suppress it.(
++
+CMake Warning \(dev\) in CMakeLists.txt:
+ Policy CMP0111 is not set: An imported target missing its location property
+ fails during generation. Run "cmake --help-policy CMP0111" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
+
+ IMPORTED_(LOCATION|IMPLIB) not set for imported target "(unknown|static|shared)_lib"( configuration
+ "[^"]+")?.
+This warning is for project developers. Use -Wno-dev to suppress it.)*$
diff --git a/Tests/RunCMake/CMP0111/main.cpp b/Tests/RunCMake/CMP0111/main.cpp
deleted file mode 100644
index 5047a34..0000000
--- a/Tests/RunCMake/CMP0111/main.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-int main()
-{
-}
diff --git a/Tests/RunCMake/CMP0111/module.cpp b/Tests/RunCMake/CMP0111/module.cpp
new file mode 100644
index 0000000..b82bb31
--- /dev/null
+++ b/Tests/RunCMake/CMP0111/module.cpp
@@ -0,0 +1,4 @@
+int module()
+{
+ return 0;
+}