This is the commit where the visibility flags were first set: f9ab5d2c612c1818125ba928520407bd6c7d9516
The extra CMP tests were added in commit 2869c9f49a36dd2bac32fda2e93aca55ea4479a3 Jon On Tue, Sep 6, 2016 at 1:46 PM Tomasz Wlostowski <[email protected]> wrote: > Hi, > > I'm trying to build the kiface DLLs with all symbols exported so that I > could link them to external test programs (e.g. P&S test cases). > > AFAIK symbol visibility is normally controlled in CMake by through the > CMAKE_CXX_VISIBILITY_PRESET variable. However, the following code in the > CMakeLists.txt file forces the symbol visibility to hidden: > > -- snip -- > > if( POLICY CMP0063 ) > cmake_policy( GET CMP0063 VISIBILITY_POLICY ) > if( VISIBILITY_POLICY STREQUAL NEW ) > message( WARNING "Compatibility code for CMake < 3.3 can be > removed, search for CMP0063" ) > else() > cmake_policy( SET CMP0063 NEW ) > endif() > else() > if( CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY AND NOT APPLE ) > set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} > ${CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY}hidden" ) > endif() > if( CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN AND NOT APPLE ) > set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} > ${CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN}" ) > endif() > endif() > > -- snip -- > > Could anybody explain what is this code for and if it's really needed > (or maybe it's buggy)? > > As a side comment, is there any practical reason to link with > -fvisibility=hidden (maybe except the stable releases)? > > Cheers, > Tom > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : [email protected] > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp >
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

