aboutsummaryrefslogtreecommitdiff
path: root/kde-modules/KDECompilerSettings.cmake
diff options
context:
space:
mode:
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