From 8155931edd5242621072ed75b94794942b09f721 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 27 Nov 2020 21:37:10 +0100 Subject: [PATCH] Disabled an obsolete linker flag on macOS. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b394a2f98..ff89b5236 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,7 +134,11 @@ else() # Enable the C++11 standard and enable optimizations as it's a release build. # This will also disable all assert() macros. Strip the binary as well. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -DNDEBUG") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2 -s") + if(APPLE) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2") + else() + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2 -s") + endif() endif() # This removes half of the ranlib warnings on macOS regarding no symbols for files that