jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
4.91k stars 1.78k forks source link

CMake: hide all symbols by default in shared lib #1240

Open SpaceIm opened 8 months ago

SpaceIm commented 8 months ago

Hide private symbols irrespective of compiler when yaml-cpp shared is built with CMake. This PR is similar to https://github.com/jbeder/yaml-cpp/pull/984, but it does not remove dll.h (which was the reason why it has been reverted in https://github.com/jbeder/yaml-cpp/pull/1038). So it doesn't break users not relying on CMake to build yaml-cpp.

Also simplify dll.h, which had lot of dead code, and weird logic for entering in declspec branch (actually it's windows specific, so _WIN32 is fine).

nigels-com commented 2 months ago

Has conflicts now.