remove --gc-sections for mac os x builds
[oweals/jsonpath.git] / CMakeLists.txt
index 0301db5655b0a4e37dc810950f6c6209d9b87575..f2ff51ec9f01f1e9cd37a980c4dfcd8db3313e5b 100644 (file)
@@ -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)