Bug#809530: Please set CMake Policy 0059 to avoid loads of warnings
Package: automoc
Version: 1.0~version-0.9.88-5
Severity: wishlist
Tags: patch
Hi,
The file /usr/lib/automoc4/Automoc4Config.cmake produces warnings such as
CMake Warning (dev) at /usr/lib/automoc4/Automoc4Config.cmake:179 (get_directory_property):
Policy CMP0059 is not set: Do no treat DEFINITIONS as a built-in directory
property. Run "cmake --help-policy CMP0059" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
See https://buildd.debian.org/status/fetch.php?pkg=digikam&arch=arm64&ver=4%3A4.14.0-1&stamp=1450639087
Since this file pre-dates the policy change -- introduced in CMake 3.3
(August 2015) -- it should be safe to select the old policy. Use the
following patch.
--- /usr/lib/automoc4/Automoc4Config.cmake~ 2009-01-22 12:50:09.000000000 -0600
+++ /usr/lib/automoc4/Automoc4Config.cmake 2015-12-31 12:45:55.667665821 -0600
@@ -48,6 +48,8 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cmake_policy(SET CMP0059 OLD)
+
get_filename_component(_AUTOMOC4_CURRENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages automoc depends on:
ii libc6 2.21-6
ii libgcc1 1:5.3.1-4
ii libqt4-dev 4:4.8.7+dfsg-5
ii libqtcore4 4:4.8.7+dfsg-5
ii libstdc++6 5.3.1-4
automoc recommends no packages.
automoc suggests no packages.
-- no debconf information
-- debsums errors found:
debsums: changed file /usr/lib/automoc4/Automoc4Config.cmake (from automoc package)
Reply to: