From 70f8c5f9efaae8f16874d8cfc551e8ae19558fba Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Sun, 27 Dec 2015 11:40:55 +0000 Subject: Silence CMP0063 warnings with KDECompilerSettings. We recommend including KDE "settings" modules with NO_POLICY_SCOPE, both so we can resolve this issue and to allow us to deal with similar things in the future. REVIEW: 126535 --- kde-modules/KDECompilerSettings.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kde-modules/KDECompilerSettings.cmake') diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index 707e5d7d..6cecefd1 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -9,6 +9,9 @@ # kde_target_enable_exceptions() can be used to re-enable them for a # specific target. # +# NB: it is recommended to include this module with the NO_POLICY_SCOPE +# flag, otherwise you may get spurious warnings with some versions of CMake. +# # This module provides the following functions:: # # kde_source_files_enable_exceptions([file1 [file2 [...]]]) @@ -199,6 +202,11 @@ endif() set(CMAKE_C_VISIBILITY_PRESET hidden) set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) +if (POLICY CMP0063) + # No sane project should be affected by CMP0063, so suppress the warnings + # generated by the above visibility settings in CMake >= 3.3 + cmake_policy(SET CMP0063 NEW) +endif() if (UNIX AND NOT APPLE) # Enable adding DT_RUNPATH, which means that LD_LIBRARY_PATH takes precedence -- cgit v1.2.1