From bf89bdf5860791dfda67b4f9d368fe4ff0009100 Mon Sep 17 00:00:00 2001 From: casey langen Date: Sat, 7 Sep 2019 10:45:00 -0700 Subject: [PATCH] Strip symbols from release binaries. https://github.com/clangen/musikcube/issues/262 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69f6f97fd..6ac9edf6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,9 +16,11 @@ include(CMakeToolsHelpers OPTIONAL) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wno-unused-result -Wno-deprecated-declarations") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -frtti -fexceptions") + # enable for additional memory checking with fsanitize # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -fsanitize=address,undefined") -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -frtti -fexceptions") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -frtti -fexceptions -s") +set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -s") if (${LINK_STATICALLY} MATCHES "true") set(Boost_USE_STATIC_LIBS ON)