1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:24:49 +02:00

Use GNU visibility attributes when on non-Windows.

This reduces binary sizes by several megabytes on my system.
This commit is contained in:
Sadie Powell
2022-01-03 23:42:12 +00:00
parent c6c9d9591c
commit db6b2225b1
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -188,7 +188,7 @@ if(MSVC)
# Otherwise, we're not using Visual Studio
else()
# Set the compile flags to have all warnings on (including shadowed variables)
set(CXXFLAGS "${CXXFLAGS} -Wall -Wextra -Wpedantic -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
set(CXXFLAGS "${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wpedantic -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
# Also, if we are building under MinGW, add another define for MinGW
if(MINGW)
add_definitions(-DMINGW)