Compile with -fvisibility=hidden.

Fixes errors when spdlog is statically linked into two shared libraries, caused by the one copy calling a function of the other. This will not cause any problems for consumers because the exported APIs are already marked with `SPDLOG_API`.
This commit is contained in:
Theodore Tsirpanis 2025-01-17 19:58:18 +02:00 committed by GitHub
parent 96a7d2a1d4
commit 94a54e5990
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,6 +35,7 @@ endif ()
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
if (CMAKE_SYSTEM_NAME MATCHES "CYGWIN" OR CMAKE_SYSTEM_NAME MATCHES "MSYS" OR CMAKE_SYSTEM_NAME MATCHES "MINGW")
set(CMAKE_CXX_EXTENSIONS ON)