From 56dcaf83e29635dc87a320fc024c45cdec49907d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 2 Jul 2016 10:16:34 +0200 Subject: [PATCH] remove --gc-sections for mac os x builds Signed-off-by: Felix Fietkau --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0301db5..f2ff51e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 2.6) PROJECT(jsonpath C) ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-error=unused-variable -ffunction-sections -D_GNU_SOURCE) -SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,--gc-sections") +IF(NOT APPLE) + SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,--gc-sections") +ENDIF() IF(APPLE) INCLUDE_DIRECTORIES(/opt/local/include) -- 2.11.0