aboutsummaryrefslogtreecommitdiff
path: root/kde-modules/KDECompilerSettings.cmake
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@kde.org>2015-12-27 11:40:55 +0000
committerAlex Merry <alex.merry@kde.org>2015-12-28 22:16:49 +0000
commit70f8c5f9efaae8f16874d8cfc551e8ae19558fba (patch)
treedd6aad78a70e7811ccaaf57fa03dbd9d1a3c2182 /kde-modules/KDECompilerSettings.cmake
parent1d4bc35cf9383177459544d6fcd9de35edf3e77d (diff)
downloadextra-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/KDECompilerSettings.cmake')
-rw-r--r--kde-modules/KDECompilerSettings.cmake8
1 files changed, 8 insertions, 0 deletions
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