diff options
author | Sadie Powell <sadie@witchery.services> | 2022-01-03 23:42:12 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2022-01-04 00:39:05 +0000 |
commit | db6b2225b186e6254443e00bc04b43664bf96d39 (patch) | |
tree | 33c815926a21fc82a137846b94449d537c89fb17 /CMakeLists.txt | |
parent | c6c9d9591cc528bc2ca70747dcb3cc248cb4269b (diff) |
Use GNU visibility attributes when on non-Windows.
This reduces binary sizes by several megabytes on my system.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cfaa69efe..157d9fc36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |