diff options
author | Brad King <brad.king@kitware.com> | 2022-04-11 22:02:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-04-14 14:14:58 (GMT) |
commit | b760828d3fa50ae621d44ac00ffa77de5593c3ed (patch) | |
tree | 2f91a473dea3de8232166d78095e20516177e0bf /Tests | |
parent | dd193fa3d357b7f1c2495348d58b85bb597844c5 (diff) | |
download | CMake-b760828d3fa50ae621d44ac00ffa77de5593c3ed.zip CMake-b760828d3fa50ae621d44ac00ffa77de5593c3ed.tar.gz CMake-b760828d3fa50ae621d44ac00ffa77de5593c3ed.tar.bz2 |
CPack/DMG: Do not use CPACK_RESOURCE_FILE_LICENSE for SLA by default
Since macOS 12.0 deprecated the tools needed to attach a SLA to a
`.dmg`, we should no longer do this by default. Add a policy to
change the default to off.
Fixes: #22978
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CPackConfig/CMP0133-NEW-check.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/CMP0133-NEW.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/CMP0133-WARN-check.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/CMP0133-WARN-stderr.txt | 12 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/CMP0133-WARN.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/RunCMakeTest.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CPackConfig/SLA.txt | 4 |
8 files changed, 29 insertions, 1 deletions
diff --git a/Tests/RunCMake/CPackConfig/CMP0133-NEW-check.cmake b/Tests/RunCMake/CPackConfig/CMP0133-NEW-check.cmake new file mode 100644 index 0000000..c1ef0d1 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/CMP0133-NEW-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_variable(CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE "") diff --git a/Tests/RunCMake/CPackConfig/CMP0133-NEW.cmake b/Tests/RunCMake/CPackConfig/CMP0133-NEW.cmake new file mode 100644 index 0000000..79c1a59 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/CMP0133-NEW.cmake @@ -0,0 +1,2 @@ +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/SLA.txt") +cmake_policy(SET CMP0133 NEW) diff --git a/Tests/RunCMake/CPackConfig/CMP0133-WARN-check.cmake b/Tests/RunCMake/CPackConfig/CMP0133-WARN-check.cmake new file mode 100644 index 0000000..01de980 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/CMP0133-WARN-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_variable(CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE "ON") diff --git a/Tests/RunCMake/CPackConfig/CMP0133-WARN-stderr.txt b/Tests/RunCMake/CPackConfig/CMP0133-WARN-stderr.txt new file mode 100644 index 0000000..2858025 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/CMP0133-WARN-stderr.txt @@ -0,0 +1,12 @@ +^CMake Warning \(dev\) at [^ +]*/Modules/CPack.cmake:[0-9]+ \(message\): + Policy CMP0133 is not set: The CPack module disables SLA by default in the + CPack DragNDrop Generator. Run "cmake --help-policy CMP0133" for policy + details. Use the cmake_policy command to set the policy and suppress this + warning. + + For compatibility, CMake will enable the SLA in the CPack DragNDrop + Generator. +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/CPackConfig/CMP0133-WARN.cmake b/Tests/RunCMake/CPackConfig/CMP0133-WARN.cmake new file mode 100644 index 0000000..3f2208b --- /dev/null +++ b/Tests/RunCMake/CPackConfig/CMP0133-WARN.cmake @@ -0,0 +1,2 @@ +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/SLA.txt") +set(CMAKE_POLICY_WARNING_CMP0133 1) diff --git a/Tests/RunCMake/CPackConfig/CMakeLists.txt b/Tests/RunCMake/CPackConfig/CMakeLists.txt index 9a9e7b4..1e071ec 100644 --- a/Tests/RunCMake/CPackConfig/CMakeLists.txt +++ b/Tests/RunCMake/CPackConfig/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.3) project(${RunCMake_TEST}) -include(${RunCMake_TEST}.cmake) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) include(CPack) diff --git a/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake index 8f2196d..32c7296 100644 --- a/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPackConfig/RunCMakeTest.cmake @@ -1,5 +1,7 @@ include(RunCMake) +run_cmake(CMP0133-NEW) +run_cmake(CMP0133-WARN) run_cmake(Simple) run_cmake(Default) run_cmake(Special) diff --git a/Tests/RunCMake/CPackConfig/SLA.txt b/Tests/RunCMake/CPackConfig/SLA.txt new file mode 100644 index 0000000..94b19c3 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/SLA.txt @@ -0,0 +1,4 @@ +Example License File +-------------------- + +This is an example license file for a DMG. |