From d947bf75f5d480466cccabb0377c0a0bdef6527e Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Mon, 6 Sep 2021 19:14:09 +0300 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 917dc243..43570035 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,10 +93,9 @@ else() endif() endif() -# Determine if build mode -if(${CMAKE_BUILD_TYPE} MATCHES "(Debug)+") - add_compile_options(-g) -endif() +# Strip binary +set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s -g") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s -g") # Enable position independent code if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")