summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLink Mauve <linkmauve@example.com>2017-09-10 03:09:19 +0200
committerLink Mauve <linkmauve@example.com>2017-09-10 03:09:19 +0200
commitc20978fc473c4bbcfbe0cbff3271bb22a8c8c430 (patch)
treeb8a9448d4ece7a8689ff8a0318679e7b8eb1330a /CMakeLists.txt
parentfe2221121828a66029913c9863e5c7bbf7a1a50b (diff)
downloadbiboumi-c20978fc473c4bbcfbe0cbff3271bb22a8c8c430.tar.gz
biboumi-c20978fc473c4bbcfbe0cbff3271bb22a8c8c430.tar.bz2
biboumi-c20978fc473c4bbcfbe0cbff3271bb22a8c8c430.tar.xz
biboumi-c20978fc473c4bbcfbe0cbff3271bb22a8c8c430.zip
CMakeLists: Set symbol visibility to hidden.
This reduces the size of the final binary by 12% by not including symbols, and thus function bodies that have been inlined for example.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 596d277..f3a79b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ find_library(LIBUBSAN NAMES ubsan libubsan.so.0)
#
## Set various debug flags (instrumentation libs, coverage, …)
#
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra -Wconversion")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra -Wconversion -fvisibility=hidden -fvisibility-inlines-hidden")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage --coverage")
endif()