[Git][wxwidgets/wxwidgets][master] 3 commits: CMake: Set hidden symbol visibility properties

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Jun 23, 2024, 8:07:15 PMJun 23
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • eaf7eeb6
    by Maarten Bent at 2024-06-23T22:25:26+02:00
    CMake: Set hidden symbol visibility properties
    
    CMake caches the HAVE_VISIBILITY result, so disable it when build options change.
    
  • 78260720
    by Maarten Bent at 2024-06-23T22:25:41+02:00
    CMake: Set visibility properties in static builds
    
    Fixes #24378
    
  • d1506f40
    by Vadim Zeitlin at 2024-06-24T01:30:20+02:00
    Merge branch 'cmake-visibility' of https://github.com/MaartenBent/wxWidgets
    
    CMake: Set hidden symbol visibility properties.
    
    See #24635.
    

2 changed files:

Changes:

  • build/cmake/functions.cmake
    ... ... @@ -111,6 +111,14 @@ function(wx_set_common_target_properties target_name)
    111 111
             set_target_properties(${target_name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
    
    112 112
         endif()
    
    113 113
     
    
    114
    +    if(NOT WIN32 AND wxUSE_VISIBILITY)
    
    115
    +        set_target_properties(${target_name} PROPERTIES
    
    116
    +            C_VISIBILITY_PRESET hidden
    
    117
    +            CXX_VISIBILITY_PRESET hidden
    
    118
    +            VISIBILITY_INLINES_HIDDEN TRUE
    
    119
    +        )
    
    120
    +    endif()
    
    121
    +
    
    114 122
         if(MSVC)
    
    115 123
             if(wxCOMMON_TARGET_PROPS_DEFAULT_WARNINGS)
    
    116 124
                 set(MSVC_WARNING_LEVEL "/W3")
    

  • build/cmake/setup.cmake
    ... ... @@ -76,11 +76,11 @@ set(wxINSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
    76 76
     
    
    77 77
     check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
    
    78 78
     
    
    79
    -if(wxBUILD_SHARED)
    
    80
    -    if(wxUSE_VISIBILITY)
    
    81
    -        check_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY)
    
    82
    -    endif()
    
    83
    -endif() # wxBUILD_SHARED
    
    79
    +if(NOT WIN32 AND wxUSE_VISIBILITY)
    
    80
    +    check_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY)
    
    81
    +else()
    
    82
    +    set(HAVE_VISIBILITY 0)
    
    83
    +endif()
    
    84 84
     
    
    85 85
     if(MSVC)
    
    86 86
         set(DISABLE_ALL_WARNINGS "/w")
    


View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help

Reply all
Reply to author
Forward
0 new messages