diff options
author | Alex Merry <alex.merry@kde.org> | 2015-12-27 11:40:55 +0000 |
---|---|---|
committer | Alex Merry <alex.merry@kde.org> | 2015-12-28 22:16:49 +0000 |
commit | 70f8c5f9efaae8f16874d8cfc551e8ae19558fba (patch) | |
tree | dd6aad78a70e7811ccaaf57fa03dbd9d1a3c2182 /kde-modules | |
parent | 1d4bc35cf9383177459544d6fcd9de35edf3e77d (diff) | |
download | extra-cmake-modules-70f8c5f9efaae8f16874d8cfc551e8ae19558fba.tar.gz extra-cmake-modules-70f8c5f9efaae8f16874d8cfc551e8ae19558fba.tar.bz2 |
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
Diffstat (limited to 'kde-modules')
-rw-r--r-- | kde-modules/KDECMakeSettings.cmake | 3 | ||||
-rw-r--r-- | kde-modules/KDECompilerSettings.cmake | 8 | ||||
-rw-r--r-- | kde-modules/KDEFrameworkCompilerSettings.cmake | 5 |
3 files changed, 15 insertions, 1 deletions
diff --git a/kde-modules/KDECMakeSettings.cmake b/kde-modules/KDECMakeSettings.cmake index c2786c1a..dd37e7f1 100644 --- a/kde-modules/KDECMakeSettings.cmake +++ b/kde-modules/KDECMakeSettings.cmake @@ -5,6 +5,9 @@ # Changes various CMake settings to what the KDE community views as more # sensible defaults. # +# It is recommended to include this module with the NO_POLICY_SCOPE flag, +# otherwise you may get spurious warnings with some versions of CMake. +# # It is split into three parts, which can be independently disabled if desired. # # Runtime Paths 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 diff --git a/kde-modules/KDEFrameworkCompilerSettings.cmake b/kde-modules/KDEFrameworkCompilerSettings.cmake index 55ab36cf..e41003d6 100644 --- a/kde-modules/KDEFrameworkCompilerSettings.cmake +++ b/kde-modules/KDEFrameworkCompilerSettings.cmake @@ -12,6 +12,9 @@ # forcing the use of QLatin1String or QStringLiteral, and some # Qt-defined keywords like signals and slots will not be defined. # +# 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. +# # Since pre-1.0.0. #============================================================================= @@ -30,7 +33,7 @@ # (To distribute this file outside of extra-cmake-modules, substitute the full # License text for the above reference.) -include(KDECompilerSettings) +include(KDECompilerSettings NO_POLICY_SCOPE) add_definitions(-DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII |