aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorh.udo <hudokkow@gmail.com>2016-09-30 21:29:17 +0100
committerh.udo <hudokkow@gmail.com>2016-09-30 21:29:17 +0100
commit6bdeecdb550a89b0e07fc8223c2b4ef5a7a358d0 (patch)
treedd805f1988ca74c61ef7f547503f04ea13cc491d
parent27c4bc61550830e51135578b3a18c818175e8f35 (diff)
[cmake] Make sure we strip when CMAKE_BUILD_TYPE=Release
-rw-r--r--project/cmake/scripts/linux/ArchSetup.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/project/cmake/scripts/linux/ArchSetup.cmake b/project/cmake/scripts/linux/ArchSetup.cmake
index be99c5b7a0..cae0bb81ea 100644
--- a/project/cmake/scripts/linux/ArchSetup.cmake
+++ b/project/cmake/scripts/linux/ArchSetup.cmake
@@ -24,6 +24,11 @@ else()
endif()
endif()
+# Make sure we strip binaries in Release build
+if(CMAKE_BUILD_TYPE STREQUAL Release AND CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
+endif()
+
find_package(CXX11 REQUIRED)
include(LDGOLD)