diff options
Diffstat (limited to 'Tests/RunCMake/CMP0111')
-rw-r--r-- | Tests/RunCMake/CMP0111/CMP0111-Common.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt | 7 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0111/CMP0111-NEW.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0111/CMP0111-OLD.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt | 26 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0111/CMP0111-WARN.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0111/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0111/RunCMakeTest.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0111/main.cpp | 3 |
10 files changed, 59 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0111/CMP0111-Common.cmake b/Tests/RunCMake/CMP0111/CMP0111-Common.cmake new file mode 100644 index 0000000..564169d --- /dev/null +++ b/Tests/RunCMake/CMP0111/CMP0111-Common.cmake @@ -0,0 +1,9 @@ +# Prevent duplicate errors on some platforms. +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_executable(executable main.cpp) +target_link_libraries(executable unknown_lib static_lib shared_lib) diff --git a/Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt b/Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0111/CMP0111-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt new file mode 100644 index 0000000..ba5d936 --- /dev/null +++ b/Tests/RunCMake/CMP0111/CMP0111-NEW-stderr.txt @@ -0,0 +1,7 @@ +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 + ".+")?. diff --git a/Tests/RunCMake/CMP0111/CMP0111-NEW.cmake b/Tests/RunCMake/CMP0111/CMP0111-NEW.cmake new file mode 100644 index 0000000..d0c8dd3 --- /dev/null +++ b/Tests/RunCMake/CMP0111/CMP0111-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0111 NEW) +include(CMP0111-Common.cmake) diff --git a/Tests/RunCMake/CMP0111/CMP0111-OLD.cmake b/Tests/RunCMake/CMP0111/CMP0111-OLD.cmake new file mode 100644 index 0000000..d00847a --- /dev/null +++ b/Tests/RunCMake/CMP0111/CMP0111-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0111 OLD) +include(CMP0111-Common.cmake) diff --git a/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt new file mode 100644 index 0000000..2fe6cc8 --- /dev/null +++ b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt @@ -0,0 +1,26 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0111 is not set: An imported target with a missing location 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: + Policy CMP0111 is not set: An imported target with a missing location 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 "static_lib"( configuration + ".+")?. +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 with a missing location 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_IMPLIB not set for imported target "shared_lib"( configuration + ".+")?. +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0111/CMP0111-WARN.cmake b/Tests/RunCMake/CMP0111/CMP0111-WARN.cmake new file mode 100644 index 0000000..0efe48c --- /dev/null +++ b/Tests/RunCMake/CMP0111/CMP0111-WARN.cmake @@ -0,0 +1 @@ +include(CMP0111-Common.cmake) diff --git a/Tests/RunCMake/CMP0111/CMakeLists.txt b/Tests/RunCMake/CMP0111/CMakeLists.txt new file mode 100644 index 0000000..9f19a75 --- /dev/null +++ b/Tests/RunCMake/CMP0111/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.17) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0111/RunCMakeTest.cmake b/Tests/RunCMake/CMP0111/RunCMakeTest.cmake new file mode 100644 index 0000000..02e420a --- /dev/null +++ b/Tests/RunCMake/CMP0111/RunCMakeTest.cmake @@ -0,0 +1,5 @@ +include(RunCMake) + +run_cmake(CMP0111-OLD) +run_cmake(CMP0111-NEW) +run_cmake(CMP0111-WARN) diff --git a/Tests/RunCMake/CMP0111/main.cpp b/Tests/RunCMake/CMP0111/main.cpp new file mode 100644 index 0000000..5047a34 --- /dev/null +++ b/Tests/RunCMake/CMP0111/main.cpp @@ -0,0 +1,3 @@ +int main() +{ +} |