[CMake] Policy CMP0063 is not set: Honor visibility properties for all target

Nils Gladitz nilsgladitz at gmail.com
Sat Jun 18 07:37:46 EDT 2016


On 18.06.2016 13:28, Alexander Shukaev wrote:
>
> But they in fact do.  How come?

I am not sure what facts you mean ... they don't:

    cmake_policy(SET CMP0063 NEW)
    cmake_policy(GET CMP0063 POLICY_VALUE_BEFORE)
    cmake_minimum_required(VERSION 3.1.0)
    cmake_policy(GET CMP0063 POLICY_VALUE_AFTER)

    message("[${POLICY_VALUE_BEFORE}] [${POLICY_VALUE_AFTER}]")

    file(WRITE foo.cpp "int main() {}")

    set(CMAKE_CXX_VISIBILITY_PRESET hidden)

    add_executable(foo foo.cpp)


Expectedly outputs for me:
     [NEW] []

(plus the policy warning since CMP0063 is in fact not set)

Nils
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160618/615c511f/attachment.html>


More information about the CMake mailing list