diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2017-09-04 08:02:09 (GMT) |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-09-04 13:32:27 (GMT) |
commit | dcb3b2d0b888902a062eefd8200ea194ed1c42d6 (patch) | |
tree | 784c8192525e3643c432733155ede0c0565ac986 /CMakeLists.txt | |
parent | 76d2c2f71602c7797ad8fdb7b22cedc37f998476 (diff) | |
download | Doxygen-dcb3b2d0b888902a062eefd8200ea194ed1c42d6.zip Doxygen-dcb3b2d0b888902a062eefd8200ea194ed1c42d6.tar.gz Doxygen-dcb3b2d0b888902a062eefd8200ea194ed1c42d6.tar.bz2 |
Use hidden symbol visibility by default
Allows us to hide all the internal symbols from the final binary.
Shaving some 10+% of its size.
v2: use CMAKE_{LANG}_VISIBILITY_PRESET
v3: add CMP0063 guard
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ed63320..05db71d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,13 @@ if (WIN32) endif() endif() +if(POLICY CMP0063) + cmake_policy(SET CMP0063 NEW) +endif() +set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_C_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) + if ("${CMAKE_GENERATOR}" MATCHES "Ninja") set(LEX_FLAGS ) set(YACC_FLAGS ) |