• Pino Toscano's avatar
    Hide most of non-public symbols by default (#984) · da1c8d36
    Pino Toscano authored
    * Export YAML::detail::node::m_amount
    
    The internal header node/detail/node.h is included by public headers;
    YAML::detail::node is implemented in the header itself, and thus it gets
    inlined... except for its static m_amount class member, which is
    instantiated in the library only. Right now all the symbols of yaml-cpp
    are exported (nothing is hidden), so the linker will find node::m_amount
    in the yaml-cpp library.
    
    As solution/workaround, explicitly export YAML::detail::node::m_amount.
    
    * CMake: use GenerateExportHeader
    
    Make use of the GenerateExportHeader CMake module to generate the dll.h
    header with export macros.
    
    While the produced dll.h is different, the result should be the same,
    i.e. nothing changes for yaml-cpp or its users.
    
    * CMake: hide all the symbols by default
    
    Hide all the symbols that are not explicitly exported with YAML_CPP_API.
    This way the ABI will be way smaller, and only actually exposing the
    public classes/functions.
    da1c8d36
node_data.cpp 7.01 KB