What to do with our default hidden visibility for symbols?
Alex Merry
alex.merry at kde.org
Sun Aug 16 11:04:38 BST 2015
On 2015-08-14 10:01, Jaroslaw Staniek wrote:
> Hi,
> ECM's KDECompilerSettings.cmake contains:
>
> # Default to hidden visibility for symbols
> set(CMAKE_CXX_VISIBILITY_PRESET hidden)
> set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
>
> This raises a warning [1] for CMake 3.3+ and ignores this.
David Faure and I are in the process of investigating how to resolve
this. Note that by default CMake 3.3+ will continue to behave just as
CMake 3.2 and earlier, except for printing the warning, unless you
either use cmake_minimum_required to require CMake 3.3 or explicitly set
policy CMP0063 to NEW.
The NEW behaviour of CMP0063 is sane and anything that depended on the
OLD behaviour was doing weird things that were not portable. Therefore,
it should be safe to do
if (POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
endif()
to use the new behaviour and silence the warning. However, we appear not
to be able to automatically do that from KDECompilerSettings.cmake
without changing every call to include(KDECompilerSettings) to
include(KDECompilerSettings NO_POLICY_SCOPE).
Alex
More information about the kde-core-devel
mailing list